@guardian/bridget 8.11.0-2026-06-02 → 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 +17 -17
- package/Videos.js +32 -32
- package/package.json +1 -1
package/Videos.d.ts
CHANGED
|
@@ -58,20 +58,20 @@ 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
|
|
61
|
+
export interface ISendVideoAttentionTimes__Args {
|
|
62
62
|
componentAttentionMs: Map<string, thrift.Int64>;
|
|
63
63
|
}
|
|
64
|
-
export interface
|
|
64
|
+
export interface ISendVideoAttentionTimes__ArgsArgs {
|
|
65
65
|
componentAttentionMs: Map<string, number | string | thrift.Int64>;
|
|
66
66
|
}
|
|
67
|
-
export declare const
|
|
68
|
-
export declare class
|
|
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
69
|
componentAttentionMs: Map<string, thrift.Int64>;
|
|
70
70
|
readonly _annotations: thrift.IThriftAnnotations;
|
|
71
71
|
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
72
|
-
constructor(args:
|
|
73
|
-
static read(input: thrift.TProtocol):
|
|
74
|
-
static write(args:
|
|
72
|
+
constructor(args: ISendVideoAttentionTimes__ArgsArgs);
|
|
73
|
+
static read(input: thrift.TProtocol): SendVideoAttentionTimes__Args;
|
|
74
|
+
static write(args: ISendVideoAttentionTimes__ArgsArgs, output: thrift.TProtocol): void;
|
|
75
75
|
write(output: thrift.TProtocol): void;
|
|
76
76
|
}
|
|
77
77
|
export interface ISetFullscreen__Args {
|
|
@@ -151,20 +151,20 @@ export declare class SendVideoEvent__Result extends thrift.StructLike implements
|
|
|
151
151
|
static write(args: ISendVideoEvent__ResultArgs, output: thrift.TProtocol): void;
|
|
152
152
|
write(output: thrift.TProtocol): void;
|
|
153
153
|
}
|
|
154
|
-
export interface
|
|
154
|
+
export interface ISendVideoAttentionTimes__Result {
|
|
155
155
|
success?: void;
|
|
156
156
|
}
|
|
157
|
-
export interface
|
|
157
|
+
export interface ISendVideoAttentionTimes__ResultArgs {
|
|
158
158
|
success?: void;
|
|
159
159
|
}
|
|
160
|
-
export declare const
|
|
161
|
-
export declare class
|
|
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
162
|
success?: void;
|
|
163
163
|
readonly _annotations: thrift.IThriftAnnotations;
|
|
164
164
|
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
165
|
-
constructor(args?:
|
|
166
|
-
static read(input: thrift.TProtocol):
|
|
167
|
-
static write(args:
|
|
165
|
+
constructor(args?: ISendVideoAttentionTimes__ResultArgs);
|
|
166
|
+
static read(input: thrift.TProtocol): SendVideoAttentionTimes__Result;
|
|
167
|
+
static write(args: ISendVideoAttentionTimes__ResultArgs, output: thrift.TProtocol): void;
|
|
168
168
|
write(output: thrift.TProtocol): void;
|
|
169
169
|
}
|
|
170
170
|
export interface ISetFullscreen__Result {
|
|
@@ -214,7 +214,7 @@ export declare class Client<Context = any> extends thrift.ThriftClient<Context>
|
|
|
214
214
|
insertVideos(videoSlots: Array<VideoSlot.IVideoSlotArgs>, context?: Context): Promise<void>;
|
|
215
215
|
updateVideos(videoSlots: Array<VideoSlot.IVideoSlotArgs>, context?: Context): Promise<void>;
|
|
216
216
|
sendVideoEvent(videoEvent: VideoEvent.IVideoEventArgs, context?: Context): Promise<void>;
|
|
217
|
-
|
|
217
|
+
sendVideoAttentionTimes(componentAttentionMs: Map<string, number | string | thrift.Int64>, context?: Context): Promise<void>;
|
|
218
218
|
setFullscreen(isFullscreen: boolean, context?: Context): Promise<boolean>;
|
|
219
219
|
isAutoplayEnabled(context?: Context): Promise<boolean>;
|
|
220
220
|
}
|
|
@@ -222,7 +222,7 @@ export interface IHandler<Context = any> {
|
|
|
222
222
|
insertVideos(videoSlots: Array<VideoSlot.IVideoSlot>, context?: Context): void | Promise<void>;
|
|
223
223
|
updateVideos(videoSlots: Array<VideoSlot.IVideoSlot>, context?: Context): void | Promise<void>;
|
|
224
224
|
sendVideoEvent(videoEvent: VideoEvent.IVideoEvent, context?: Context): void | Promise<void>;
|
|
225
|
-
|
|
225
|
+
sendVideoAttentionTimes(componentAttentionMs: Map<string, thrift.Int64>, context?: Context): void | Promise<void>;
|
|
226
226
|
setFullscreen(isFullscreen: boolean, context?: Context): boolean | Promise<boolean>;
|
|
227
227
|
isAutoplayEnabled(context?: Context): boolean | Promise<boolean>;
|
|
228
228
|
}
|
|
@@ -241,7 +241,7 @@ export declare class Processor<Context = any> extends thrift.ThriftProcessor<Con
|
|
|
241
241
|
process_insertVideos(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
242
242
|
process_updateVideos(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
243
243
|
process_sendVideoEvent(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
244
|
-
|
|
244
|
+
process_sendVideoAttentionTimes(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
245
245
|
process_setFullscreen(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
246
246
|
process_isAutoplayEnabled(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
247
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.
|
|
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,7 +48,7 @@ exports.methodAnnotations = {
|
|
|
48
48
|
annotations: {},
|
|
49
49
|
fieldAnnotations: {}
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
sendVideoAttentionTimes: {
|
|
52
52
|
annotations: {},
|
|
53
53
|
fieldAnnotations: {}
|
|
54
54
|
},
|
|
@@ -61,12 +61,12 @@ exports.methodAnnotations = {
|
|
|
61
61
|
fieldAnnotations: {}
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
exports.methodNames = ["insertVideos", "updateVideos", "sendVideoEvent", "
|
|
64
|
+
exports.methodNames = ["insertVideos", "updateVideos", "sendVideoEvent", "sendVideoAttentionTimes", "setFullscreen", "isAutoplayEnabled"];
|
|
65
65
|
exports.methodParameters = {
|
|
66
66
|
insertVideos: 2,
|
|
67
67
|
updateVideos: 2,
|
|
68
68
|
sendVideoEvent: 2,
|
|
69
|
-
|
|
69
|
+
sendVideoAttentionTimes: 2,
|
|
70
70
|
setFullscreen: 2,
|
|
71
71
|
isAutoplayEnabled: 1
|
|
72
72
|
};
|
|
@@ -337,12 +337,12 @@ class SendVideoEvent__Args extends thrift.StructLike {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
exports.SendVideoEvent__Args = SendVideoEvent__Args;
|
|
340
|
-
exports.
|
|
340
|
+
exports.SendVideoAttentionTimes__ArgsCodec = {
|
|
341
341
|
encode(args, output) {
|
|
342
342
|
const obj = {
|
|
343
343
|
componentAttentionMs: args.componentAttentionMs
|
|
344
344
|
};
|
|
345
|
-
output.writeStructBegin("
|
|
345
|
+
output.writeStructBegin("SendVideoAttentionTimes__Args");
|
|
346
346
|
if (obj.componentAttentionMs != null) {
|
|
347
347
|
output.writeFieldBegin("componentAttentionMs", thrift.TType.MAP, 1);
|
|
348
348
|
output.writeMapBegin(thrift.TType.STRING, thrift.TType.I64, obj.componentAttentionMs.size);
|
|
@@ -401,11 +401,11 @@ exports.SendVideoAttentionTime__ArgsCodec = {
|
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
else {
|
|
404
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read
|
|
404
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read SendVideoAttentionTimes__Args from input");
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
|
-
class
|
|
408
|
+
class SendVideoAttentionTimes__Args extends thrift.StructLike {
|
|
409
409
|
constructor(args) {
|
|
410
410
|
super();
|
|
411
411
|
this._annotations = {};
|
|
@@ -424,16 +424,16 @@ class SendVideoAttentionTime__Args extends thrift.StructLike {
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
static read(input) {
|
|
427
|
-
return new
|
|
427
|
+
return new SendVideoAttentionTimes__Args(exports.SendVideoAttentionTimes__ArgsCodec.decode(input));
|
|
428
428
|
}
|
|
429
429
|
static write(args, output) {
|
|
430
|
-
return exports.
|
|
430
|
+
return exports.SendVideoAttentionTimes__ArgsCodec.encode(args, output);
|
|
431
431
|
}
|
|
432
432
|
write(output) {
|
|
433
|
-
return exports.
|
|
433
|
+
return exports.SendVideoAttentionTimes__ArgsCodec.encode(this, output);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
exports.
|
|
436
|
+
exports.SendVideoAttentionTimes__Args = SendVideoAttentionTimes__Args;
|
|
437
437
|
exports.SetFullscreen__ArgsCodec = {
|
|
438
438
|
encode(args, output) {
|
|
439
439
|
const obj = {
|
|
@@ -734,9 +734,9 @@ class SendVideoEvent__Result extends thrift.StructLike {
|
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
exports.SendVideoEvent__Result = SendVideoEvent__Result;
|
|
737
|
-
exports.
|
|
737
|
+
exports.SendVideoAttentionTimes__ResultCodec = {
|
|
738
738
|
encode(args, output) {
|
|
739
|
-
output.writeStructBegin("
|
|
739
|
+
output.writeStructBegin("SendVideoAttentionTimes__Result");
|
|
740
740
|
output.writeFieldStop();
|
|
741
741
|
output.writeStructEnd();
|
|
742
742
|
return;
|
|
@@ -772,7 +772,7 @@ exports.SendVideoAttentionTime__ResultCodec = {
|
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
774
|
};
|
|
775
|
-
class
|
|
775
|
+
class SendVideoAttentionTimes__Result extends thrift.StructLike {
|
|
776
776
|
constructor(args = {}) {
|
|
777
777
|
super();
|
|
778
778
|
this._annotations = {};
|
|
@@ -783,16 +783,16 @@ class SendVideoAttentionTime__Result extends thrift.StructLike {
|
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
static read(input) {
|
|
786
|
-
return new
|
|
786
|
+
return new SendVideoAttentionTimes__Result(exports.SendVideoAttentionTimes__ResultCodec.decode(input));
|
|
787
787
|
}
|
|
788
788
|
static write(args, output) {
|
|
789
|
-
return exports.
|
|
789
|
+
return exports.SendVideoAttentionTimes__ResultCodec.encode(args, output);
|
|
790
790
|
}
|
|
791
791
|
write(output) {
|
|
792
|
-
return exports.
|
|
792
|
+
return exports.SendVideoAttentionTimes__ResultCodec.encode(this, output);
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
exports.
|
|
795
|
+
exports.SendVideoAttentionTimes__Result = SendVideoAttentionTimes__Result;
|
|
796
796
|
exports.SetFullscreen__ResultCodec = {
|
|
797
797
|
encode(args, output) {
|
|
798
798
|
const obj = {
|
|
@@ -1037,26 +1037,26 @@ class Client extends thrift.ThriftClient {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
|
-
|
|
1040
|
+
sendVideoAttentionTimes(componentAttentionMs, context) {
|
|
1041
1041
|
const writer = new this.transport();
|
|
1042
1042
|
const output = new this.protocol(writer);
|
|
1043
|
-
output.writeMessageBegin("
|
|
1043
|
+
output.writeMessageBegin("sendVideoAttentionTimes", thrift.MessageType.CALL, this.incrementRequestId());
|
|
1044
1044
|
const args = { componentAttentionMs };
|
|
1045
|
-
exports.
|
|
1045
|
+
exports.SendVideoAttentionTimes__ArgsCodec.encode(args, output);
|
|
1046
1046
|
output.writeMessageEnd();
|
|
1047
1047
|
return this.connection.send(writer.flush(), context).then((data) => {
|
|
1048
1048
|
const reader = this.transport.receiver(data);
|
|
1049
1049
|
const input = new this.protocol(reader);
|
|
1050
1050
|
try {
|
|
1051
1051
|
const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
|
|
1052
|
-
if (fieldName === "
|
|
1052
|
+
if (fieldName === "sendVideoAttentionTimes") {
|
|
1053
1053
|
if (messageType === thrift.MessageType.EXCEPTION) {
|
|
1054
1054
|
const err = thrift.TApplicationExceptionCodec.decode(input);
|
|
1055
1055
|
input.readMessageEnd();
|
|
1056
1056
|
return Promise.reject(err);
|
|
1057
1057
|
}
|
|
1058
1058
|
else {
|
|
1059
|
-
const result = exports.
|
|
1059
|
+
const result = exports.SendVideoAttentionTimes__ResultCodec.decode(input);
|
|
1060
1060
|
input.readMessageEnd();
|
|
1061
1061
|
return Promise.resolve(result.success);
|
|
1062
1062
|
}
|
|
@@ -1180,8 +1180,8 @@ class Processor extends thrift.ThriftProcessor {
|
|
|
1180
1180
|
resolve(this.process_sendVideoEvent(requestId, input, output, context));
|
|
1181
1181
|
break;
|
|
1182
1182
|
}
|
|
1183
|
-
case "
|
|
1184
|
-
resolve(this.
|
|
1183
|
+
case "process_sendVideoAttentionTimes": {
|
|
1184
|
+
resolve(this.process_sendVideoAttentionTimes(requestId, input, output, context));
|
|
1185
1185
|
break;
|
|
1186
1186
|
}
|
|
1187
1187
|
case "process_setFullscreen": {
|
|
@@ -1278,25 +1278,25 @@ class Processor extends thrift.ThriftProcessor {
|
|
|
1278
1278
|
return output.flush();
|
|
1279
1279
|
});
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1281
|
+
process_sendVideoAttentionTimes(requestId, input, output, context) {
|
|
1282
1282
|
return new Promise((resolve, reject) => {
|
|
1283
1283
|
try {
|
|
1284
|
-
const args = exports.
|
|
1284
|
+
const args = exports.SendVideoAttentionTimes__ArgsCodec.decode(input);
|
|
1285
1285
|
input.readMessageEnd();
|
|
1286
|
-
resolve(this._handler.
|
|
1286
|
+
resolve(this._handler.sendVideoAttentionTimes(args.componentAttentionMs, context));
|
|
1287
1287
|
}
|
|
1288
1288
|
catch (err) {
|
|
1289
1289
|
reject(err);
|
|
1290
1290
|
}
|
|
1291
1291
|
}).then((data) => {
|
|
1292
1292
|
const result = { success: data };
|
|
1293
|
-
output.writeMessageBegin("
|
|
1294
|
-
exports.
|
|
1293
|
+
output.writeMessageBegin("sendVideoAttentionTimes", thrift.MessageType.REPLY, requestId);
|
|
1294
|
+
exports.SendVideoAttentionTimes__ResultCodec.encode(result, output);
|
|
1295
1295
|
output.writeMessageEnd();
|
|
1296
1296
|
return output.flush();
|
|
1297
1297
|
}).catch((err) => {
|
|
1298
1298
|
const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
1299
|
-
output.writeMessageBegin("
|
|
1299
|
+
output.writeMessageBegin("sendVideoAttentionTimes", thrift.MessageType.EXCEPTION, requestId);
|
|
1300
1300
|
thrift.TApplicationExceptionCodec.encode(result, output);
|
|
1301
1301
|
output.writeMessageEnd();
|
|
1302
1302
|
return output.flush();
|