@guardian/bridget 8.10.0 → 8.11.0-2026-06-01

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.
@@ -0,0 +1,190 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import * as thrift from "@creditkarma/thrift-server-core";
4
+ export declare const serviceName: string;
5
+ export declare const annotations: thrift.IThriftAnnotations;
6
+ export declare const methodAnnotations: thrift.IMethodAnnotations;
7
+ export declare const methodNames: Array<string>;
8
+ export declare const methodParameters: {
9
+ [methodName: string]: number;
10
+ };
11
+ export interface IIsAvailable__Args {
12
+ activityType: string;
13
+ activityId: string;
14
+ }
15
+ export interface IIsAvailable__ArgsArgs {
16
+ activityType: string;
17
+ activityId: string;
18
+ }
19
+ export declare const IsAvailable__ArgsCodec: thrift.IStructCodec<IIsAvailable__ArgsArgs, IIsAvailable__Args>;
20
+ export declare class IsAvailable__Args extends thrift.StructLike implements IIsAvailable__Args {
21
+ activityType: string;
22
+ activityId: string;
23
+ readonly _annotations: thrift.IThriftAnnotations;
24
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
25
+ constructor(args: IIsAvailable__ArgsArgs);
26
+ static read(input: thrift.TProtocol): IsAvailable__Args;
27
+ static write(args: IIsAvailable__ArgsArgs, output: thrift.TProtocol): void;
28
+ write(output: thrift.TProtocol): void;
29
+ }
30
+ export interface IFollow__Args {
31
+ activityType: string;
32
+ activityId: string;
33
+ }
34
+ export interface IFollow__ArgsArgs {
35
+ activityType: string;
36
+ activityId: string;
37
+ }
38
+ export declare const Follow__ArgsCodec: thrift.IStructCodec<IFollow__ArgsArgs, IFollow__Args>;
39
+ export declare class Follow__Args extends thrift.StructLike implements IFollow__Args {
40
+ activityType: string;
41
+ activityId: string;
42
+ readonly _annotations: thrift.IThriftAnnotations;
43
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
44
+ constructor(args: IFollow__ArgsArgs);
45
+ static read(input: thrift.TProtocol): Follow__Args;
46
+ static write(args: IFollow__ArgsArgs, output: thrift.TProtocol): void;
47
+ write(output: thrift.TProtocol): void;
48
+ }
49
+ export interface IUnfollow__Args {
50
+ activityType: string;
51
+ activityId: string;
52
+ }
53
+ export interface IUnfollow__ArgsArgs {
54
+ activityType: string;
55
+ activityId: string;
56
+ }
57
+ export declare const Unfollow__ArgsCodec: thrift.IStructCodec<IUnfollow__ArgsArgs, IUnfollow__Args>;
58
+ export declare class Unfollow__Args extends thrift.StructLike implements IUnfollow__Args {
59
+ activityType: string;
60
+ activityId: string;
61
+ readonly _annotations: thrift.IThriftAnnotations;
62
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
63
+ constructor(args: IUnfollow__ArgsArgs);
64
+ static read(input: thrift.TProtocol): Unfollow__Args;
65
+ static write(args: IUnfollow__ArgsArgs, output: thrift.TProtocol): void;
66
+ write(output: thrift.TProtocol): void;
67
+ }
68
+ export interface IIsFollowing__Args {
69
+ activityType: string;
70
+ activityId: string;
71
+ }
72
+ export interface IIsFollowing__ArgsArgs {
73
+ activityType: string;
74
+ activityId: string;
75
+ }
76
+ export declare const IsFollowing__ArgsCodec: thrift.IStructCodec<IIsFollowing__ArgsArgs, IIsFollowing__Args>;
77
+ export declare class IsFollowing__Args extends thrift.StructLike implements IIsFollowing__Args {
78
+ activityType: string;
79
+ activityId: string;
80
+ readonly _annotations: thrift.IThriftAnnotations;
81
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
82
+ constructor(args: IIsFollowing__ArgsArgs);
83
+ static read(input: thrift.TProtocol): IsFollowing__Args;
84
+ static write(args: IIsFollowing__ArgsArgs, output: thrift.TProtocol): void;
85
+ write(output: thrift.TProtocol): void;
86
+ }
87
+ export interface IIsAvailable__Result {
88
+ success?: boolean;
89
+ }
90
+ export interface IIsAvailable__ResultArgs {
91
+ success?: boolean;
92
+ }
93
+ export declare const IsAvailable__ResultCodec: thrift.IStructCodec<IIsAvailable__ResultArgs, IIsAvailable__Result>;
94
+ export declare class IsAvailable__Result extends thrift.StructLike implements IIsAvailable__Result {
95
+ success?: boolean;
96
+ readonly _annotations: thrift.IThriftAnnotations;
97
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
98
+ constructor(args?: IIsAvailable__ResultArgs);
99
+ static read(input: thrift.TProtocol): IsAvailable__Result;
100
+ static write(args: IIsAvailable__ResultArgs, output: thrift.TProtocol): void;
101
+ write(output: thrift.TProtocol): void;
102
+ }
103
+ export interface IFollow__Result {
104
+ success?: boolean;
105
+ }
106
+ export interface IFollow__ResultArgs {
107
+ success?: boolean;
108
+ }
109
+ export declare const Follow__ResultCodec: thrift.IStructCodec<IFollow__ResultArgs, IFollow__Result>;
110
+ export declare class Follow__Result extends thrift.StructLike implements IFollow__Result {
111
+ success?: boolean;
112
+ readonly _annotations: thrift.IThriftAnnotations;
113
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
114
+ constructor(args?: IFollow__ResultArgs);
115
+ static read(input: thrift.TProtocol): Follow__Result;
116
+ static write(args: IFollow__ResultArgs, output: thrift.TProtocol): void;
117
+ write(output: thrift.TProtocol): void;
118
+ }
119
+ export interface IUnfollow__Result {
120
+ success?: boolean;
121
+ }
122
+ export interface IUnfollow__ResultArgs {
123
+ success?: boolean;
124
+ }
125
+ export declare const Unfollow__ResultCodec: thrift.IStructCodec<IUnfollow__ResultArgs, IUnfollow__Result>;
126
+ export declare class Unfollow__Result extends thrift.StructLike implements IUnfollow__Result {
127
+ success?: boolean;
128
+ readonly _annotations: thrift.IThriftAnnotations;
129
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
130
+ constructor(args?: IUnfollow__ResultArgs);
131
+ static read(input: thrift.TProtocol): Unfollow__Result;
132
+ static write(args: IUnfollow__ResultArgs, output: thrift.TProtocol): void;
133
+ write(output: thrift.TProtocol): void;
134
+ }
135
+ export interface IIsFollowing__Result {
136
+ success?: boolean;
137
+ }
138
+ export interface IIsFollowing__ResultArgs {
139
+ success?: boolean;
140
+ }
141
+ export declare const IsFollowing__ResultCodec: thrift.IStructCodec<IIsFollowing__ResultArgs, IIsFollowing__Result>;
142
+ export declare class IsFollowing__Result extends thrift.StructLike implements IIsFollowing__Result {
143
+ success?: boolean;
144
+ readonly _annotations: thrift.IThriftAnnotations;
145
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
146
+ constructor(args?: IIsFollowing__ResultArgs);
147
+ static read(input: thrift.TProtocol): IsFollowing__Result;
148
+ static write(args: IIsFollowing__ResultArgs, output: thrift.TProtocol): void;
149
+ write(output: thrift.TProtocol): void;
150
+ }
151
+ export declare class Client<Context = any> extends thrift.ThriftClient<Context> {
152
+ static readonly serviceName: string;
153
+ static readonly annotations: thrift.IThriftAnnotations;
154
+ static readonly methodAnnotations: thrift.IMethodAnnotations;
155
+ static readonly methodNames: Array<string>;
156
+ readonly _serviceName: string;
157
+ readonly _annotations: thrift.IThriftAnnotations;
158
+ readonly _methodAnnotations: thrift.IMethodAnnotations;
159
+ readonly _methodNames: Array<string>;
160
+ readonly _methodParameters?: {
161
+ [methodName: string]: number;
162
+ };
163
+ isAvailable(activityType: string, activityId: string, context?: Context): Promise<boolean>;
164
+ follow(activityType: string, activityId: string, context?: Context): Promise<boolean>;
165
+ unfollow(activityType: string, activityId: string, context?: Context): Promise<boolean>;
166
+ isFollowing(activityType: string, activityId: string, context?: Context): Promise<boolean>;
167
+ }
168
+ export interface IHandler<Context = any> {
169
+ isAvailable(activityType: string, activityId: string, context?: Context): boolean | Promise<boolean>;
170
+ follow(activityType: string, activityId: string, context?: Context): boolean | Promise<boolean>;
171
+ unfollow(activityType: string, activityId: string, context?: Context): boolean | Promise<boolean>;
172
+ isFollowing(activityType: string, activityId: string, context?: Context): boolean | Promise<boolean>;
173
+ }
174
+ export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
175
+ protected readonly _handler: IHandler<Context>;
176
+ static readonly serviceName: string;
177
+ static readonly annotations: thrift.IThriftAnnotations;
178
+ static readonly methodAnnotations: thrift.IMethodAnnotations;
179
+ static readonly methodNames: Array<string>;
180
+ readonly _serviceName: string;
181
+ readonly _annotations: thrift.IThriftAnnotations;
182
+ readonly _methodAnnotations: thrift.IMethodAnnotations;
183
+ readonly _methodNames: Array<string>;
184
+ constructor(handler: IHandler<Context>);
185
+ process(input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
186
+ process_isAvailable(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
187
+ process_follow(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
188
+ process_unfollow(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
189
+ process_isFollowing(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
190
+ }
@@ -0,0 +1,1067 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Processor = exports.Client = exports.IsFollowing__Result = exports.IsFollowing__ResultCodec = exports.Unfollow__Result = exports.Unfollow__ResultCodec = exports.Follow__Result = exports.Follow__ResultCodec = exports.IsAvailable__Result = exports.IsAvailable__ResultCodec = exports.IsFollowing__Args = exports.IsFollowing__ArgsCodec = exports.Unfollow__Args = exports.Unfollow__ArgsCodec = exports.Follow__Args = exports.Follow__ArgsCodec = exports.IsAvailable__Args = exports.IsAvailable__ArgsCodec = exports.methodParameters = exports.methodNames = exports.methodAnnotations = exports.annotations = exports.serviceName = void 0;
27
+ /* tslint:disable */
28
+ /* eslint-disable */
29
+ /*
30
+ * Autogenerated by @creditkarma/thrift-typescript v3.7.6
31
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
32
+ */
33
+ const thrift = __importStar(require("@creditkarma/thrift-server-core"));
34
+ exports.serviceName = "LiveActivities";
35
+ exports.annotations = {};
36
+ exports.methodAnnotations = {
37
+ isAvailable: {
38
+ annotations: {},
39
+ fieldAnnotations: {}
40
+ },
41
+ follow: {
42
+ annotations: {},
43
+ fieldAnnotations: {}
44
+ },
45
+ unfollow: {
46
+ annotations: {},
47
+ fieldAnnotations: {}
48
+ },
49
+ isFollowing: {
50
+ annotations: {},
51
+ fieldAnnotations: {}
52
+ }
53
+ };
54
+ exports.methodNames = ["isAvailable", "follow", "unfollow", "isFollowing"];
55
+ exports.methodParameters = {
56
+ isAvailable: 3,
57
+ follow: 3,
58
+ unfollow: 3,
59
+ isFollowing: 3
60
+ };
61
+ exports.IsAvailable__ArgsCodec = {
62
+ encode(args, output) {
63
+ const obj = {
64
+ activityType: args.activityType,
65
+ activityId: args.activityId
66
+ };
67
+ output.writeStructBegin("IsAvailable__Args");
68
+ if (obj.activityType != null) {
69
+ output.writeFieldBegin("activityType", thrift.TType.STRING, 1);
70
+ output.writeString(obj.activityType);
71
+ output.writeFieldEnd();
72
+ }
73
+ else {
74
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
75
+ }
76
+ if (obj.activityId != null) {
77
+ output.writeFieldBegin("activityId", thrift.TType.STRING, 2);
78
+ output.writeString(obj.activityId);
79
+ output.writeFieldEnd();
80
+ }
81
+ else {
82
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
83
+ }
84
+ output.writeFieldStop();
85
+ output.writeStructEnd();
86
+ return;
87
+ },
88
+ decode(input) {
89
+ let _args = {};
90
+ input.readStructBegin();
91
+ while (true) {
92
+ const ret = input.readFieldBegin();
93
+ const fieldType = ret.fieldType;
94
+ const fieldId = ret.fieldId;
95
+ if (fieldType === thrift.TType.STOP) {
96
+ break;
97
+ }
98
+ switch (fieldId) {
99
+ case 1:
100
+ if (fieldType === thrift.TType.STRING) {
101
+ const value_1 = input.readString();
102
+ _args.activityType = value_1;
103
+ }
104
+ else {
105
+ input.skip(fieldType);
106
+ }
107
+ break;
108
+ case 2:
109
+ if (fieldType === thrift.TType.STRING) {
110
+ const value_2 = input.readString();
111
+ _args.activityId = value_2;
112
+ }
113
+ else {
114
+ input.skip(fieldType);
115
+ }
116
+ break;
117
+ default: {
118
+ input.skip(fieldType);
119
+ }
120
+ }
121
+ input.readFieldEnd();
122
+ }
123
+ input.readStructEnd();
124
+ if (_args.activityType !== undefined && _args.activityId !== undefined) {
125
+ return {
126
+ activityType: _args.activityType,
127
+ activityId: _args.activityId
128
+ };
129
+ }
130
+ else {
131
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read IsAvailable__Args from input");
132
+ }
133
+ }
134
+ };
135
+ class IsAvailable__Args extends thrift.StructLike {
136
+ constructor(args) {
137
+ super();
138
+ this._annotations = {};
139
+ this._fieldAnnotations = {};
140
+ if (args.activityType != null) {
141
+ const value_3 = args.activityType;
142
+ this.activityType = value_3;
143
+ }
144
+ else {
145
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
146
+ }
147
+ if (args.activityId != null) {
148
+ const value_4 = args.activityId;
149
+ this.activityId = value_4;
150
+ }
151
+ else {
152
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
153
+ }
154
+ }
155
+ static read(input) {
156
+ return new IsAvailable__Args(exports.IsAvailable__ArgsCodec.decode(input));
157
+ }
158
+ static write(args, output) {
159
+ return exports.IsAvailable__ArgsCodec.encode(args, output);
160
+ }
161
+ write(output) {
162
+ return exports.IsAvailable__ArgsCodec.encode(this, output);
163
+ }
164
+ }
165
+ exports.IsAvailable__Args = IsAvailable__Args;
166
+ exports.Follow__ArgsCodec = {
167
+ encode(args, output) {
168
+ const obj = {
169
+ activityType: args.activityType,
170
+ activityId: args.activityId
171
+ };
172
+ output.writeStructBegin("Follow__Args");
173
+ if (obj.activityType != null) {
174
+ output.writeFieldBegin("activityType", thrift.TType.STRING, 1);
175
+ output.writeString(obj.activityType);
176
+ output.writeFieldEnd();
177
+ }
178
+ else {
179
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
180
+ }
181
+ if (obj.activityId != null) {
182
+ output.writeFieldBegin("activityId", thrift.TType.STRING, 2);
183
+ output.writeString(obj.activityId);
184
+ output.writeFieldEnd();
185
+ }
186
+ else {
187
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
188
+ }
189
+ output.writeFieldStop();
190
+ output.writeStructEnd();
191
+ return;
192
+ },
193
+ decode(input) {
194
+ let _args = {};
195
+ input.readStructBegin();
196
+ while (true) {
197
+ const ret = input.readFieldBegin();
198
+ const fieldType = ret.fieldType;
199
+ const fieldId = ret.fieldId;
200
+ if (fieldType === thrift.TType.STOP) {
201
+ break;
202
+ }
203
+ switch (fieldId) {
204
+ case 1:
205
+ if (fieldType === thrift.TType.STRING) {
206
+ const value_5 = input.readString();
207
+ _args.activityType = value_5;
208
+ }
209
+ else {
210
+ input.skip(fieldType);
211
+ }
212
+ break;
213
+ case 2:
214
+ if (fieldType === thrift.TType.STRING) {
215
+ const value_6 = input.readString();
216
+ _args.activityId = value_6;
217
+ }
218
+ else {
219
+ input.skip(fieldType);
220
+ }
221
+ break;
222
+ default: {
223
+ input.skip(fieldType);
224
+ }
225
+ }
226
+ input.readFieldEnd();
227
+ }
228
+ input.readStructEnd();
229
+ if (_args.activityType !== undefined && _args.activityId !== undefined) {
230
+ return {
231
+ activityType: _args.activityType,
232
+ activityId: _args.activityId
233
+ };
234
+ }
235
+ else {
236
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read Follow__Args from input");
237
+ }
238
+ }
239
+ };
240
+ class Follow__Args extends thrift.StructLike {
241
+ constructor(args) {
242
+ super();
243
+ this._annotations = {};
244
+ this._fieldAnnotations = {};
245
+ if (args.activityType != null) {
246
+ const value_7 = args.activityType;
247
+ this.activityType = value_7;
248
+ }
249
+ else {
250
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
251
+ }
252
+ if (args.activityId != null) {
253
+ const value_8 = args.activityId;
254
+ this.activityId = value_8;
255
+ }
256
+ else {
257
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
258
+ }
259
+ }
260
+ static read(input) {
261
+ return new Follow__Args(exports.Follow__ArgsCodec.decode(input));
262
+ }
263
+ static write(args, output) {
264
+ return exports.Follow__ArgsCodec.encode(args, output);
265
+ }
266
+ write(output) {
267
+ return exports.Follow__ArgsCodec.encode(this, output);
268
+ }
269
+ }
270
+ exports.Follow__Args = Follow__Args;
271
+ exports.Unfollow__ArgsCodec = {
272
+ encode(args, output) {
273
+ const obj = {
274
+ activityType: args.activityType,
275
+ activityId: args.activityId
276
+ };
277
+ output.writeStructBegin("Unfollow__Args");
278
+ if (obj.activityType != null) {
279
+ output.writeFieldBegin("activityType", thrift.TType.STRING, 1);
280
+ output.writeString(obj.activityType);
281
+ output.writeFieldEnd();
282
+ }
283
+ else {
284
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
285
+ }
286
+ if (obj.activityId != null) {
287
+ output.writeFieldBegin("activityId", thrift.TType.STRING, 2);
288
+ output.writeString(obj.activityId);
289
+ output.writeFieldEnd();
290
+ }
291
+ else {
292
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
293
+ }
294
+ output.writeFieldStop();
295
+ output.writeStructEnd();
296
+ return;
297
+ },
298
+ decode(input) {
299
+ let _args = {};
300
+ input.readStructBegin();
301
+ while (true) {
302
+ const ret = input.readFieldBegin();
303
+ const fieldType = ret.fieldType;
304
+ const fieldId = ret.fieldId;
305
+ if (fieldType === thrift.TType.STOP) {
306
+ break;
307
+ }
308
+ switch (fieldId) {
309
+ case 1:
310
+ if (fieldType === thrift.TType.STRING) {
311
+ const value_9 = input.readString();
312
+ _args.activityType = value_9;
313
+ }
314
+ else {
315
+ input.skip(fieldType);
316
+ }
317
+ break;
318
+ case 2:
319
+ if (fieldType === thrift.TType.STRING) {
320
+ const value_10 = input.readString();
321
+ _args.activityId = value_10;
322
+ }
323
+ else {
324
+ input.skip(fieldType);
325
+ }
326
+ break;
327
+ default: {
328
+ input.skip(fieldType);
329
+ }
330
+ }
331
+ input.readFieldEnd();
332
+ }
333
+ input.readStructEnd();
334
+ if (_args.activityType !== undefined && _args.activityId !== undefined) {
335
+ return {
336
+ activityType: _args.activityType,
337
+ activityId: _args.activityId
338
+ };
339
+ }
340
+ else {
341
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read Unfollow__Args from input");
342
+ }
343
+ }
344
+ };
345
+ class Unfollow__Args extends thrift.StructLike {
346
+ constructor(args) {
347
+ super();
348
+ this._annotations = {};
349
+ this._fieldAnnotations = {};
350
+ if (args.activityType != null) {
351
+ const value_11 = args.activityType;
352
+ this.activityType = value_11;
353
+ }
354
+ else {
355
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
356
+ }
357
+ if (args.activityId != null) {
358
+ const value_12 = args.activityId;
359
+ this.activityId = value_12;
360
+ }
361
+ else {
362
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
363
+ }
364
+ }
365
+ static read(input) {
366
+ return new Unfollow__Args(exports.Unfollow__ArgsCodec.decode(input));
367
+ }
368
+ static write(args, output) {
369
+ return exports.Unfollow__ArgsCodec.encode(args, output);
370
+ }
371
+ write(output) {
372
+ return exports.Unfollow__ArgsCodec.encode(this, output);
373
+ }
374
+ }
375
+ exports.Unfollow__Args = Unfollow__Args;
376
+ exports.IsFollowing__ArgsCodec = {
377
+ encode(args, output) {
378
+ const obj = {
379
+ activityType: args.activityType,
380
+ activityId: args.activityId
381
+ };
382
+ output.writeStructBegin("IsFollowing__Args");
383
+ if (obj.activityType != null) {
384
+ output.writeFieldBegin("activityType", thrift.TType.STRING, 1);
385
+ output.writeString(obj.activityType);
386
+ output.writeFieldEnd();
387
+ }
388
+ else {
389
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
390
+ }
391
+ if (obj.activityId != null) {
392
+ output.writeFieldBegin("activityId", thrift.TType.STRING, 2);
393
+ output.writeString(obj.activityId);
394
+ output.writeFieldEnd();
395
+ }
396
+ else {
397
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
398
+ }
399
+ output.writeFieldStop();
400
+ output.writeStructEnd();
401
+ return;
402
+ },
403
+ decode(input) {
404
+ let _args = {};
405
+ input.readStructBegin();
406
+ while (true) {
407
+ const ret = input.readFieldBegin();
408
+ const fieldType = ret.fieldType;
409
+ const fieldId = ret.fieldId;
410
+ if (fieldType === thrift.TType.STOP) {
411
+ break;
412
+ }
413
+ switch (fieldId) {
414
+ case 1:
415
+ if (fieldType === thrift.TType.STRING) {
416
+ const value_13 = input.readString();
417
+ _args.activityType = value_13;
418
+ }
419
+ else {
420
+ input.skip(fieldType);
421
+ }
422
+ break;
423
+ case 2:
424
+ if (fieldType === thrift.TType.STRING) {
425
+ const value_14 = input.readString();
426
+ _args.activityId = value_14;
427
+ }
428
+ else {
429
+ input.skip(fieldType);
430
+ }
431
+ break;
432
+ default: {
433
+ input.skip(fieldType);
434
+ }
435
+ }
436
+ input.readFieldEnd();
437
+ }
438
+ input.readStructEnd();
439
+ if (_args.activityType !== undefined && _args.activityId !== undefined) {
440
+ return {
441
+ activityType: _args.activityType,
442
+ activityId: _args.activityId
443
+ };
444
+ }
445
+ else {
446
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read IsFollowing__Args from input");
447
+ }
448
+ }
449
+ };
450
+ class IsFollowing__Args extends thrift.StructLike {
451
+ constructor(args) {
452
+ super();
453
+ this._annotations = {};
454
+ this._fieldAnnotations = {};
455
+ if (args.activityType != null) {
456
+ const value_15 = args.activityType;
457
+ this.activityType = value_15;
458
+ }
459
+ else {
460
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityType] is unset!");
461
+ }
462
+ if (args.activityId != null) {
463
+ const value_16 = args.activityId;
464
+ this.activityId = value_16;
465
+ }
466
+ else {
467
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[activityId] is unset!");
468
+ }
469
+ }
470
+ static read(input) {
471
+ return new IsFollowing__Args(exports.IsFollowing__ArgsCodec.decode(input));
472
+ }
473
+ static write(args, output) {
474
+ return exports.IsFollowing__ArgsCodec.encode(args, output);
475
+ }
476
+ write(output) {
477
+ return exports.IsFollowing__ArgsCodec.encode(this, output);
478
+ }
479
+ }
480
+ exports.IsFollowing__Args = IsFollowing__Args;
481
+ exports.IsAvailable__ResultCodec = {
482
+ encode(args, output) {
483
+ const obj = {
484
+ success: args.success
485
+ };
486
+ output.writeStructBegin("IsAvailable__Result");
487
+ if (obj.success != null) {
488
+ output.writeFieldBegin("success", thrift.TType.BOOL, 0);
489
+ output.writeBool(obj.success);
490
+ output.writeFieldEnd();
491
+ }
492
+ output.writeFieldStop();
493
+ output.writeStructEnd();
494
+ return;
495
+ },
496
+ decode(input) {
497
+ let _args = {};
498
+ input.readStructBegin();
499
+ while (true) {
500
+ const ret = input.readFieldBegin();
501
+ const fieldType = ret.fieldType;
502
+ const fieldId = ret.fieldId;
503
+ if (fieldType === thrift.TType.STOP) {
504
+ break;
505
+ }
506
+ switch (fieldId) {
507
+ case 0:
508
+ if (fieldType === thrift.TType.BOOL) {
509
+ const value_17 = input.readBool();
510
+ _args.success = value_17;
511
+ }
512
+ else {
513
+ input.skip(fieldType);
514
+ }
515
+ break;
516
+ default: {
517
+ input.skip(fieldType);
518
+ }
519
+ }
520
+ input.readFieldEnd();
521
+ }
522
+ input.readStructEnd();
523
+ return {
524
+ success: _args.success
525
+ };
526
+ }
527
+ };
528
+ class IsAvailable__Result extends thrift.StructLike {
529
+ constructor(args = {}) {
530
+ super();
531
+ this._annotations = {};
532
+ this._fieldAnnotations = {};
533
+ if (args.success != null) {
534
+ const value_18 = args.success;
535
+ this.success = value_18;
536
+ }
537
+ }
538
+ static read(input) {
539
+ return new IsAvailable__Result(exports.IsAvailable__ResultCodec.decode(input));
540
+ }
541
+ static write(args, output) {
542
+ return exports.IsAvailable__ResultCodec.encode(args, output);
543
+ }
544
+ write(output) {
545
+ return exports.IsAvailable__ResultCodec.encode(this, output);
546
+ }
547
+ }
548
+ exports.IsAvailable__Result = IsAvailable__Result;
549
+ exports.Follow__ResultCodec = {
550
+ encode(args, output) {
551
+ const obj = {
552
+ success: args.success
553
+ };
554
+ output.writeStructBegin("Follow__Result");
555
+ if (obj.success != null) {
556
+ output.writeFieldBegin("success", thrift.TType.BOOL, 0);
557
+ output.writeBool(obj.success);
558
+ output.writeFieldEnd();
559
+ }
560
+ output.writeFieldStop();
561
+ output.writeStructEnd();
562
+ return;
563
+ },
564
+ decode(input) {
565
+ let _args = {};
566
+ input.readStructBegin();
567
+ while (true) {
568
+ const ret = input.readFieldBegin();
569
+ const fieldType = ret.fieldType;
570
+ const fieldId = ret.fieldId;
571
+ if (fieldType === thrift.TType.STOP) {
572
+ break;
573
+ }
574
+ switch (fieldId) {
575
+ case 0:
576
+ if (fieldType === thrift.TType.BOOL) {
577
+ const value_19 = input.readBool();
578
+ _args.success = value_19;
579
+ }
580
+ else {
581
+ input.skip(fieldType);
582
+ }
583
+ break;
584
+ default: {
585
+ input.skip(fieldType);
586
+ }
587
+ }
588
+ input.readFieldEnd();
589
+ }
590
+ input.readStructEnd();
591
+ return {
592
+ success: _args.success
593
+ };
594
+ }
595
+ };
596
+ class Follow__Result extends thrift.StructLike {
597
+ constructor(args = {}) {
598
+ super();
599
+ this._annotations = {};
600
+ this._fieldAnnotations = {};
601
+ if (args.success != null) {
602
+ const value_20 = args.success;
603
+ this.success = value_20;
604
+ }
605
+ }
606
+ static read(input) {
607
+ return new Follow__Result(exports.Follow__ResultCodec.decode(input));
608
+ }
609
+ static write(args, output) {
610
+ return exports.Follow__ResultCodec.encode(args, output);
611
+ }
612
+ write(output) {
613
+ return exports.Follow__ResultCodec.encode(this, output);
614
+ }
615
+ }
616
+ exports.Follow__Result = Follow__Result;
617
+ exports.Unfollow__ResultCodec = {
618
+ encode(args, output) {
619
+ const obj = {
620
+ success: args.success
621
+ };
622
+ output.writeStructBegin("Unfollow__Result");
623
+ if (obj.success != null) {
624
+ output.writeFieldBegin("success", thrift.TType.BOOL, 0);
625
+ output.writeBool(obj.success);
626
+ output.writeFieldEnd();
627
+ }
628
+ output.writeFieldStop();
629
+ output.writeStructEnd();
630
+ return;
631
+ },
632
+ decode(input) {
633
+ let _args = {};
634
+ input.readStructBegin();
635
+ while (true) {
636
+ const ret = input.readFieldBegin();
637
+ const fieldType = ret.fieldType;
638
+ const fieldId = ret.fieldId;
639
+ if (fieldType === thrift.TType.STOP) {
640
+ break;
641
+ }
642
+ switch (fieldId) {
643
+ case 0:
644
+ if (fieldType === thrift.TType.BOOL) {
645
+ const value_21 = input.readBool();
646
+ _args.success = value_21;
647
+ }
648
+ else {
649
+ input.skip(fieldType);
650
+ }
651
+ break;
652
+ default: {
653
+ input.skip(fieldType);
654
+ }
655
+ }
656
+ input.readFieldEnd();
657
+ }
658
+ input.readStructEnd();
659
+ return {
660
+ success: _args.success
661
+ };
662
+ }
663
+ };
664
+ class Unfollow__Result extends thrift.StructLike {
665
+ constructor(args = {}) {
666
+ super();
667
+ this._annotations = {};
668
+ this._fieldAnnotations = {};
669
+ if (args.success != null) {
670
+ const value_22 = args.success;
671
+ this.success = value_22;
672
+ }
673
+ }
674
+ static read(input) {
675
+ return new Unfollow__Result(exports.Unfollow__ResultCodec.decode(input));
676
+ }
677
+ static write(args, output) {
678
+ return exports.Unfollow__ResultCodec.encode(args, output);
679
+ }
680
+ write(output) {
681
+ return exports.Unfollow__ResultCodec.encode(this, output);
682
+ }
683
+ }
684
+ exports.Unfollow__Result = Unfollow__Result;
685
+ exports.IsFollowing__ResultCodec = {
686
+ encode(args, output) {
687
+ const obj = {
688
+ success: args.success
689
+ };
690
+ output.writeStructBegin("IsFollowing__Result");
691
+ if (obj.success != null) {
692
+ output.writeFieldBegin("success", thrift.TType.BOOL, 0);
693
+ output.writeBool(obj.success);
694
+ output.writeFieldEnd();
695
+ }
696
+ output.writeFieldStop();
697
+ output.writeStructEnd();
698
+ return;
699
+ },
700
+ decode(input) {
701
+ let _args = {};
702
+ input.readStructBegin();
703
+ while (true) {
704
+ const ret = input.readFieldBegin();
705
+ const fieldType = ret.fieldType;
706
+ const fieldId = ret.fieldId;
707
+ if (fieldType === thrift.TType.STOP) {
708
+ break;
709
+ }
710
+ switch (fieldId) {
711
+ case 0:
712
+ if (fieldType === thrift.TType.BOOL) {
713
+ const value_23 = input.readBool();
714
+ _args.success = value_23;
715
+ }
716
+ else {
717
+ input.skip(fieldType);
718
+ }
719
+ break;
720
+ default: {
721
+ input.skip(fieldType);
722
+ }
723
+ }
724
+ input.readFieldEnd();
725
+ }
726
+ input.readStructEnd();
727
+ return {
728
+ success: _args.success
729
+ };
730
+ }
731
+ };
732
+ class IsFollowing__Result extends thrift.StructLike {
733
+ constructor(args = {}) {
734
+ super();
735
+ this._annotations = {};
736
+ this._fieldAnnotations = {};
737
+ if (args.success != null) {
738
+ const value_24 = args.success;
739
+ this.success = value_24;
740
+ }
741
+ }
742
+ static read(input) {
743
+ return new IsFollowing__Result(exports.IsFollowing__ResultCodec.decode(input));
744
+ }
745
+ static write(args, output) {
746
+ return exports.IsFollowing__ResultCodec.encode(args, output);
747
+ }
748
+ write(output) {
749
+ return exports.IsFollowing__ResultCodec.encode(this, output);
750
+ }
751
+ }
752
+ exports.IsFollowing__Result = IsFollowing__Result;
753
+ class Client extends thrift.ThriftClient {
754
+ constructor() {
755
+ super(...arguments);
756
+ this._serviceName = exports.serviceName;
757
+ this._annotations = exports.annotations;
758
+ this._methodAnnotations = exports.methodAnnotations;
759
+ this._methodNames = exports.methodNames;
760
+ this._methodParameters = exports.methodParameters;
761
+ }
762
+ isAvailable(activityType, activityId, context) {
763
+ const writer = new this.transport();
764
+ const output = new this.protocol(writer);
765
+ output.writeMessageBegin("isAvailable", thrift.MessageType.CALL, this.incrementRequestId());
766
+ const args = { activityType, activityId };
767
+ exports.IsAvailable__ArgsCodec.encode(args, output);
768
+ output.writeMessageEnd();
769
+ return this.connection.send(writer.flush(), context).then((data) => {
770
+ const reader = this.transport.receiver(data);
771
+ const input = new this.protocol(reader);
772
+ try {
773
+ const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
774
+ if (fieldName === "isAvailable") {
775
+ if (messageType === thrift.MessageType.EXCEPTION) {
776
+ const err = thrift.TApplicationExceptionCodec.decode(input);
777
+ input.readMessageEnd();
778
+ return Promise.reject(err);
779
+ }
780
+ else {
781
+ const result = exports.IsAvailable__ResultCodec.decode(input);
782
+ input.readMessageEnd();
783
+ if (result.success != null) {
784
+ return Promise.resolve(result.success);
785
+ }
786
+ else {
787
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, "isAvailable failed: unknown result"));
788
+ }
789
+ }
790
+ }
791
+ else {
792
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, "Received a response to an unknown RPC function: " + fieldName));
793
+ }
794
+ }
795
+ catch (err) {
796
+ return Promise.reject(err);
797
+ }
798
+ });
799
+ }
800
+ follow(activityType, activityId, context) {
801
+ const writer = new this.transport();
802
+ const output = new this.protocol(writer);
803
+ output.writeMessageBegin("follow", thrift.MessageType.CALL, this.incrementRequestId());
804
+ const args = { activityType, activityId };
805
+ exports.Follow__ArgsCodec.encode(args, output);
806
+ output.writeMessageEnd();
807
+ return this.connection.send(writer.flush(), context).then((data) => {
808
+ const reader = this.transport.receiver(data);
809
+ const input = new this.protocol(reader);
810
+ try {
811
+ const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
812
+ if (fieldName === "follow") {
813
+ if (messageType === thrift.MessageType.EXCEPTION) {
814
+ const err = thrift.TApplicationExceptionCodec.decode(input);
815
+ input.readMessageEnd();
816
+ return Promise.reject(err);
817
+ }
818
+ else {
819
+ const result = exports.Follow__ResultCodec.decode(input);
820
+ input.readMessageEnd();
821
+ if (result.success != null) {
822
+ return Promise.resolve(result.success);
823
+ }
824
+ else {
825
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, "follow failed: unknown result"));
826
+ }
827
+ }
828
+ }
829
+ else {
830
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, "Received a response to an unknown RPC function: " + fieldName));
831
+ }
832
+ }
833
+ catch (err) {
834
+ return Promise.reject(err);
835
+ }
836
+ });
837
+ }
838
+ unfollow(activityType, activityId, context) {
839
+ const writer = new this.transport();
840
+ const output = new this.protocol(writer);
841
+ output.writeMessageBegin("unfollow", thrift.MessageType.CALL, this.incrementRequestId());
842
+ const args = { activityType, activityId };
843
+ exports.Unfollow__ArgsCodec.encode(args, output);
844
+ output.writeMessageEnd();
845
+ return this.connection.send(writer.flush(), context).then((data) => {
846
+ const reader = this.transport.receiver(data);
847
+ const input = new this.protocol(reader);
848
+ try {
849
+ const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
850
+ if (fieldName === "unfollow") {
851
+ if (messageType === thrift.MessageType.EXCEPTION) {
852
+ const err = thrift.TApplicationExceptionCodec.decode(input);
853
+ input.readMessageEnd();
854
+ return Promise.reject(err);
855
+ }
856
+ else {
857
+ const result = exports.Unfollow__ResultCodec.decode(input);
858
+ input.readMessageEnd();
859
+ if (result.success != null) {
860
+ return Promise.resolve(result.success);
861
+ }
862
+ else {
863
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, "unfollow failed: unknown result"));
864
+ }
865
+ }
866
+ }
867
+ else {
868
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, "Received a response to an unknown RPC function: " + fieldName));
869
+ }
870
+ }
871
+ catch (err) {
872
+ return Promise.reject(err);
873
+ }
874
+ });
875
+ }
876
+ isFollowing(activityType, activityId, context) {
877
+ const writer = new this.transport();
878
+ const output = new this.protocol(writer);
879
+ output.writeMessageBegin("isFollowing", thrift.MessageType.CALL, this.incrementRequestId());
880
+ const args = { activityType, activityId };
881
+ exports.IsFollowing__ArgsCodec.encode(args, output);
882
+ output.writeMessageEnd();
883
+ return this.connection.send(writer.flush(), context).then((data) => {
884
+ const reader = this.transport.receiver(data);
885
+ const input = new this.protocol(reader);
886
+ try {
887
+ const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
888
+ if (fieldName === "isFollowing") {
889
+ if (messageType === thrift.MessageType.EXCEPTION) {
890
+ const err = thrift.TApplicationExceptionCodec.decode(input);
891
+ input.readMessageEnd();
892
+ return Promise.reject(err);
893
+ }
894
+ else {
895
+ const result = exports.IsFollowing__ResultCodec.decode(input);
896
+ input.readMessageEnd();
897
+ if (result.success != null) {
898
+ return Promise.resolve(result.success);
899
+ }
900
+ else {
901
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, "isFollowing failed: unknown result"));
902
+ }
903
+ }
904
+ }
905
+ else {
906
+ return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, "Received a response to an unknown RPC function: " + fieldName));
907
+ }
908
+ }
909
+ catch (err) {
910
+ return Promise.reject(err);
911
+ }
912
+ });
913
+ }
914
+ }
915
+ exports.Client = Client;
916
+ Client.serviceName = exports.serviceName;
917
+ Client.annotations = exports.annotations;
918
+ Client.methodAnnotations = exports.methodAnnotations;
919
+ Client.methodNames = exports.methodNames;
920
+ class Processor extends thrift.ThriftProcessor {
921
+ constructor(handler) {
922
+ super();
923
+ this._serviceName = exports.serviceName;
924
+ this._annotations = exports.annotations;
925
+ this._methodAnnotations = exports.methodAnnotations;
926
+ this._methodNames = exports.methodNames;
927
+ this._handler = handler;
928
+ }
929
+ process(input, output, context) {
930
+ return new Promise((resolve, reject) => {
931
+ const metadata = input.readMessageBegin();
932
+ const fieldName = metadata.fieldName;
933
+ const requestId = metadata.requestId;
934
+ const methodName = "process_" + fieldName;
935
+ switch (methodName) {
936
+ case "process_isAvailable": {
937
+ resolve(this.process_isAvailable(requestId, input, output, context));
938
+ break;
939
+ }
940
+ case "process_follow": {
941
+ resolve(this.process_follow(requestId, input, output, context));
942
+ break;
943
+ }
944
+ case "process_unfollow": {
945
+ resolve(this.process_unfollow(requestId, input, output, context));
946
+ break;
947
+ }
948
+ case "process_isFollowing": {
949
+ resolve(this.process_isFollowing(requestId, input, output, context));
950
+ break;
951
+ }
952
+ default: {
953
+ input.skip(thrift.TType.STRUCT);
954
+ input.readMessageEnd();
955
+ const errMessage = "Unknown function " + fieldName;
956
+ const err = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN_METHOD, errMessage);
957
+ output.writeMessageBegin(fieldName, thrift.MessageType.EXCEPTION, requestId);
958
+ thrift.TApplicationExceptionCodec.encode(err, output);
959
+ output.writeMessageEnd();
960
+ resolve(output.flush());
961
+ break;
962
+ }
963
+ }
964
+ });
965
+ }
966
+ process_isAvailable(requestId, input, output, context) {
967
+ return new Promise((resolve, reject) => {
968
+ try {
969
+ const args = exports.IsAvailable__ArgsCodec.decode(input);
970
+ input.readMessageEnd();
971
+ resolve(this._handler.isAvailable(args.activityType, args.activityId, context));
972
+ }
973
+ catch (err) {
974
+ reject(err);
975
+ }
976
+ }).then((data) => {
977
+ const result = { success: data };
978
+ output.writeMessageBegin("isAvailable", thrift.MessageType.REPLY, requestId);
979
+ exports.IsAvailable__ResultCodec.encode(result, output);
980
+ output.writeMessageEnd();
981
+ return output.flush();
982
+ }).catch((err) => {
983
+ const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
984
+ output.writeMessageBegin("isAvailable", thrift.MessageType.EXCEPTION, requestId);
985
+ thrift.TApplicationExceptionCodec.encode(result, output);
986
+ output.writeMessageEnd();
987
+ return output.flush();
988
+ });
989
+ }
990
+ process_follow(requestId, input, output, context) {
991
+ return new Promise((resolve, reject) => {
992
+ try {
993
+ const args = exports.Follow__ArgsCodec.decode(input);
994
+ input.readMessageEnd();
995
+ resolve(this._handler.follow(args.activityType, args.activityId, context));
996
+ }
997
+ catch (err) {
998
+ reject(err);
999
+ }
1000
+ }).then((data) => {
1001
+ const result = { success: data };
1002
+ output.writeMessageBegin("follow", thrift.MessageType.REPLY, requestId);
1003
+ exports.Follow__ResultCodec.encode(result, output);
1004
+ output.writeMessageEnd();
1005
+ return output.flush();
1006
+ }).catch((err) => {
1007
+ const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
1008
+ output.writeMessageBegin("follow", thrift.MessageType.EXCEPTION, requestId);
1009
+ thrift.TApplicationExceptionCodec.encode(result, output);
1010
+ output.writeMessageEnd();
1011
+ return output.flush();
1012
+ });
1013
+ }
1014
+ process_unfollow(requestId, input, output, context) {
1015
+ return new Promise((resolve, reject) => {
1016
+ try {
1017
+ const args = exports.Unfollow__ArgsCodec.decode(input);
1018
+ input.readMessageEnd();
1019
+ resolve(this._handler.unfollow(args.activityType, args.activityId, context));
1020
+ }
1021
+ catch (err) {
1022
+ reject(err);
1023
+ }
1024
+ }).then((data) => {
1025
+ const result = { success: data };
1026
+ output.writeMessageBegin("unfollow", thrift.MessageType.REPLY, requestId);
1027
+ exports.Unfollow__ResultCodec.encode(result, output);
1028
+ output.writeMessageEnd();
1029
+ return output.flush();
1030
+ }).catch((err) => {
1031
+ const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
1032
+ output.writeMessageBegin("unfollow", thrift.MessageType.EXCEPTION, requestId);
1033
+ thrift.TApplicationExceptionCodec.encode(result, output);
1034
+ output.writeMessageEnd();
1035
+ return output.flush();
1036
+ });
1037
+ }
1038
+ process_isFollowing(requestId, input, output, context) {
1039
+ return new Promise((resolve, reject) => {
1040
+ try {
1041
+ const args = exports.IsFollowing__ArgsCodec.decode(input);
1042
+ input.readMessageEnd();
1043
+ resolve(this._handler.isFollowing(args.activityType, args.activityId, context));
1044
+ }
1045
+ catch (err) {
1046
+ reject(err);
1047
+ }
1048
+ }).then((data) => {
1049
+ const result = { success: data };
1050
+ output.writeMessageBegin("isFollowing", thrift.MessageType.REPLY, requestId);
1051
+ exports.IsFollowing__ResultCodec.encode(result, output);
1052
+ output.writeMessageEnd();
1053
+ return output.flush();
1054
+ }).catch((err) => {
1055
+ const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
1056
+ output.writeMessageBegin("isFollowing", thrift.MessageType.EXCEPTION, requestId);
1057
+ thrift.TApplicationExceptionCodec.encode(result, output);
1058
+ output.writeMessageEnd();
1059
+ return output.flush();
1060
+ });
1061
+ }
1062
+ }
1063
+ exports.Processor = Processor;
1064
+ Processor.serviceName = exports.serviceName;
1065
+ Processor.annotations = exports.annotations;
1066
+ Processor.methodAnnotations = exports.methodAnnotations;
1067
+ Processor.methodNames = exports.methodNames;
package/MediaEvent.d.ts CHANGED
@@ -11,5 +11,6 @@ export declare enum MediaEvent {
11
11
  unmute = 9,
12
12
  enter_fullscreen = 10,
13
13
  exit_fullscreen = 11,
14
- view = 12
14
+ view = 12,
15
+ resume = 13
15
16
  }
package/MediaEvent.js CHANGED
@@ -22,4 +22,5 @@ var MediaEvent;
22
22
  MediaEvent[MediaEvent["enter_fullscreen"] = 10] = "enter_fullscreen";
23
23
  MediaEvent[MediaEvent["exit_fullscreen"] = 11] = "exit_fullscreen";
24
24
  MediaEvent[MediaEvent["view"] = 12] = "view";
25
+ MediaEvent[MediaEvent["resume"] = 13] = "resume";
25
26
  })(MediaEvent || (exports.MediaEvent = MediaEvent = {}));
package/index.d.ts CHANGED
@@ -57,3 +57,5 @@ import * as Interaction from "./Interaction";
57
57
  export { Interaction as Interaction };
58
58
  import * as Interactives from "./Interactives";
59
59
  export { Interactives as Interactives };
60
+ import * as LiveActivities from "./LiveActivities";
61
+ export { LiveActivities as LiveActivities };
package/index.js CHANGED
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Interactives = exports.Interaction = exports.Newsletters = exports.Navigation = exports.AbTesting = exports.Analytics = exports.Discussion = exports.Metrics = exports.Videos = exports.Gallery = exports.User = exports.Audio = exports.ListenToArticle = exports.MatchNotifications = exports.Notifications = exports.Tag = exports.Acquisitions = exports.Commercial = exports.Environment = void 0;
29
+ exports.LiveActivities = exports.Interactives = exports.Interaction = exports.Newsletters = exports.Navigation = exports.AbTesting = exports.Analytics = exports.Discussion = exports.Metrics = exports.Videos = exports.Gallery = exports.User = exports.Audio = exports.ListenToArticle = exports.MatchNotifications = exports.Notifications = exports.Tag = exports.Acquisitions = exports.Commercial = exports.Environment = void 0;
30
30
  /* tslint:disable */
31
31
  /* eslint-disable */
32
32
  /*
@@ -92,3 +92,5 @@ const Interaction = __importStar(require("./Interaction"));
92
92
  exports.Interaction = Interaction;
93
93
  const Interactives = __importStar(require("./Interactives"));
94
94
  exports.Interactives = Interactives;
95
+ const LiveActivities = __importStar(require("./LiveActivities"));
96
+ exports.LiveActivities = LiveActivities;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/bridget",
3
- "version": "8.10.0",
3
+ "version": "8.11.0-2026-06-01",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {