@guardian/bridget 5.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Discussion.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import * as thrift from "@creditkarma/thrift-server-core";
4
- import * as DiscussionResponse from "./DiscussionResponse";
5
- import * as GetUserProfileResponse from "./GetUserProfileResponse";
4
+ import * as DiscussionServiceResponse from "./DiscussionServiceResponse";
6
5
  export declare const serviceName: string;
7
6
  export declare const annotations: thrift.IThriftAnnotations;
8
7
  export declare const methodAnnotations: thrift.IMethodAnnotations;
@@ -81,14 +80,14 @@ export declare class GetUserProfile__Args extends thrift.StructLike implements I
81
80
  write(output: thrift.TProtocol): void;
82
81
  }
83
82
  export interface IRecommend__Result {
84
- success?: DiscussionResponse.DiscussionResponse;
83
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
85
84
  }
86
85
  export interface IRecommend__ResultArgs {
87
- success?: DiscussionResponse.DiscussionResponseArgs;
86
+ success?: DiscussionServiceResponse.DiscussionServiceResponseArgs;
88
87
  }
89
88
  export declare const Recommend__ResultCodec: thrift.IStructCodec<IRecommend__ResultArgs, IRecommend__Result>;
90
89
  export declare class Recommend__Result extends thrift.StructLike implements IRecommend__Result {
91
- success?: DiscussionResponse.DiscussionResponse;
90
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
92
91
  readonly _annotations: thrift.IThriftAnnotations;
93
92
  readonly _fieldAnnotations: thrift.IFieldAnnotations;
94
93
  constructor(args?: IRecommend__ResultArgs);
@@ -97,14 +96,14 @@ export declare class Recommend__Result extends thrift.StructLike implements IRec
97
96
  write(output: thrift.TProtocol): void;
98
97
  }
99
98
  export interface IComment__Result {
100
- success?: DiscussionResponse.DiscussionResponse;
99
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
101
100
  }
102
101
  export interface IComment__ResultArgs {
103
- success?: DiscussionResponse.DiscussionResponseArgs;
102
+ success?: DiscussionServiceResponse.DiscussionServiceResponseArgs;
104
103
  }
105
104
  export declare const Comment__ResultCodec: thrift.IStructCodec<IComment__ResultArgs, IComment__Result>;
106
105
  export declare class Comment__Result extends thrift.StructLike implements IComment__Result {
107
- success?: DiscussionResponse.DiscussionResponse;
106
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
108
107
  readonly _annotations: thrift.IThriftAnnotations;
109
108
  readonly _fieldAnnotations: thrift.IFieldAnnotations;
110
109
  constructor(args?: IComment__ResultArgs);
@@ -113,14 +112,14 @@ export declare class Comment__Result extends thrift.StructLike implements IComme
113
112
  write(output: thrift.TProtocol): void;
114
113
  }
115
114
  export interface IReply__Result {
116
- success?: DiscussionResponse.DiscussionResponse;
115
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
117
116
  }
118
117
  export interface IReply__ResultArgs {
119
- success?: DiscussionResponse.DiscussionResponseArgs;
118
+ success?: DiscussionServiceResponse.DiscussionServiceResponseArgs;
120
119
  }
121
120
  export declare const Reply__ResultCodec: thrift.IStructCodec<IReply__ResultArgs, IReply__Result>;
122
121
  export declare class Reply__Result extends thrift.StructLike implements IReply__Result {
123
- success?: DiscussionResponse.DiscussionResponse;
122
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
124
123
  readonly _annotations: thrift.IThriftAnnotations;
125
124
  readonly _fieldAnnotations: thrift.IFieldAnnotations;
126
125
  constructor(args?: IReply__ResultArgs);
@@ -129,14 +128,14 @@ export declare class Reply__Result extends thrift.StructLike implements IReply__
129
128
  write(output: thrift.TProtocol): void;
130
129
  }
131
130
  export interface IGetUserProfile__Result {
132
- success?: GetUserProfileResponse.GetUserProfileResponse;
131
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
133
132
  }
134
133
  export interface IGetUserProfile__ResultArgs {
135
- success?: GetUserProfileResponse.GetUserProfileResponseArgs;
134
+ success?: DiscussionServiceResponse.DiscussionServiceResponseArgs;
136
135
  }
137
136
  export declare const GetUserProfile__ResultCodec: thrift.IStructCodec<IGetUserProfile__ResultArgs, IGetUserProfile__Result>;
138
137
  export declare class GetUserProfile__Result extends thrift.StructLike implements IGetUserProfile__Result {
139
- success?: GetUserProfileResponse.GetUserProfileResponse;
138
+ success?: DiscussionServiceResponse.DiscussionServiceResponse;
140
139
  readonly _annotations: thrift.IThriftAnnotations;
141
140
  readonly _fieldAnnotations: thrift.IFieldAnnotations;
142
141
  constructor(args?: IGetUserProfile__ResultArgs);
@@ -156,16 +155,16 @@ export declare class Client<Context = any> extends thrift.ThriftClient<Context>
156
155
  readonly _methodParameters?: {
157
156
  [methodName: string]: number;
158
157
  };
159
- recommend(commentId: string, context?: Context): Promise<DiscussionResponse.DiscussionResponse>;
160
- comment(shortUrl: string, body: string, context?: Context): Promise<DiscussionResponse.DiscussionResponse>;
161
- reply(shortUrl: string, body: string, parentCommentId: string, context?: Context): Promise<DiscussionResponse.DiscussionResponse>;
162
- getUserProfile(context?: Context): Promise<GetUserProfileResponse.GetUserProfileResponse>;
158
+ recommend(commentId: string, context?: Context): Promise<DiscussionServiceResponse.DiscussionServiceResponse>;
159
+ comment(shortUrl: string, body: string, context?: Context): Promise<DiscussionServiceResponse.DiscussionServiceResponse>;
160
+ reply(shortUrl: string, body: string, parentCommentId: string, context?: Context): Promise<DiscussionServiceResponse.DiscussionServiceResponse>;
161
+ getUserProfile(context?: Context): Promise<DiscussionServiceResponse.DiscussionServiceResponse>;
163
162
  }
164
163
  export interface IHandler<Context = any> {
165
- recommend(commentId: string, context?: Context): DiscussionResponse.DiscussionResponseArgs | Promise<DiscussionResponse.DiscussionResponseArgs>;
166
- comment(shortUrl: string, body: string, context?: Context): DiscussionResponse.DiscussionResponseArgs | Promise<DiscussionResponse.DiscussionResponseArgs>;
167
- reply(shortUrl: string, body: string, parentCommentId: string, context?: Context): DiscussionResponse.DiscussionResponseArgs | Promise<DiscussionResponse.DiscussionResponseArgs>;
168
- getUserProfile(context?: Context): GetUserProfileResponse.GetUserProfileResponseArgs | Promise<GetUserProfileResponse.GetUserProfileResponseArgs>;
164
+ recommend(commentId: string, context?: Context): DiscussionServiceResponse.DiscussionServiceResponseArgs | Promise<DiscussionServiceResponse.DiscussionServiceResponseArgs>;
165
+ comment(shortUrl: string, body: string, context?: Context): DiscussionServiceResponse.DiscussionServiceResponseArgs | Promise<DiscussionServiceResponse.DiscussionServiceResponseArgs>;
166
+ reply(shortUrl: string, body: string, parentCommentId: string, context?: Context): DiscussionServiceResponse.DiscussionServiceResponseArgs | Promise<DiscussionServiceResponse.DiscussionServiceResponseArgs>;
167
+ getUserProfile(context?: Context): DiscussionServiceResponse.DiscussionServiceResponseArgs | Promise<DiscussionServiceResponse.DiscussionServiceResponseArgs>;
169
168
  }
170
169
  export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
171
170
  protected readonly _handler: IHandler<Context>;
package/Discussion.js CHANGED
@@ -31,8 +31,7 @@ exports.Processor = exports.Client = exports.GetUserProfile__Result = exports.Ge
31
31
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
32
32
  */
33
33
  const thrift = __importStar(require("@creditkarma/thrift-server-core"));
34
- const DiscussionResponse = __importStar(require("./DiscussionResponse"));
35
- const GetUserProfileResponse = __importStar(require("./GetUserProfileResponse"));
34
+ const DiscussionServiceResponse = __importStar(require("./DiscussionServiceResponse"));
36
35
  exports.serviceName = "Discussion";
37
36
  exports.annotations = {};
38
37
  exports.methodAnnotations = {
@@ -427,7 +426,7 @@ exports.Recommend__ResultCodec = {
427
426
  output.writeStructBegin("Recommend__Result");
428
427
  if (obj.success != null) {
429
428
  output.writeFieldBegin("success", thrift.TType.STRUCT, 0);
430
- DiscussionResponse.DiscussionResponseCodec.encode(obj.success, output);
429
+ DiscussionServiceResponse.DiscussionServiceResponseCodec.encode(obj.success, output);
431
430
  output.writeFieldEnd();
432
431
  }
433
432
  output.writeFieldStop();
@@ -447,7 +446,7 @@ exports.Recommend__ResultCodec = {
447
446
  switch (fieldId) {
448
447
  case 0:
449
448
  if (fieldType === thrift.TType.STRUCT) {
450
- const value_13 = DiscussionResponse.DiscussionResponseCodec.decode(input);
449
+ const value_13 = DiscussionServiceResponse.DiscussionServiceResponseCodec.decode(input);
451
450
  _args.success = value_13;
452
451
  }
453
452
  else {
@@ -472,7 +471,7 @@ class Recommend__Result extends thrift.StructLike {
472
471
  this._annotations = {};
473
472
  this._fieldAnnotations = {};
474
473
  if (args.success != null) {
475
- const value_14 = DiscussionResponse.DiscussionResponseCodec.create(args.success);
474
+ const value_14 = DiscussionServiceResponse.DiscussionServiceResponseCodec.create(args.success);
476
475
  this.success = value_14;
477
476
  }
478
477
  }
@@ -495,7 +494,7 @@ exports.Comment__ResultCodec = {
495
494
  output.writeStructBegin("Comment__Result");
496
495
  if (obj.success != null) {
497
496
  output.writeFieldBegin("success", thrift.TType.STRUCT, 0);
498
- DiscussionResponse.DiscussionResponseCodec.encode(obj.success, output);
497
+ DiscussionServiceResponse.DiscussionServiceResponseCodec.encode(obj.success, output);
499
498
  output.writeFieldEnd();
500
499
  }
501
500
  output.writeFieldStop();
@@ -515,7 +514,7 @@ exports.Comment__ResultCodec = {
515
514
  switch (fieldId) {
516
515
  case 0:
517
516
  if (fieldType === thrift.TType.STRUCT) {
518
- const value_15 = DiscussionResponse.DiscussionResponseCodec.decode(input);
517
+ const value_15 = DiscussionServiceResponse.DiscussionServiceResponseCodec.decode(input);
519
518
  _args.success = value_15;
520
519
  }
521
520
  else {
@@ -540,7 +539,7 @@ class Comment__Result extends thrift.StructLike {
540
539
  this._annotations = {};
541
540
  this._fieldAnnotations = {};
542
541
  if (args.success != null) {
543
- const value_16 = DiscussionResponse.DiscussionResponseCodec.create(args.success);
542
+ const value_16 = DiscussionServiceResponse.DiscussionServiceResponseCodec.create(args.success);
544
543
  this.success = value_16;
545
544
  }
546
545
  }
@@ -563,7 +562,7 @@ exports.Reply__ResultCodec = {
563
562
  output.writeStructBegin("Reply__Result");
564
563
  if (obj.success != null) {
565
564
  output.writeFieldBegin("success", thrift.TType.STRUCT, 0);
566
- DiscussionResponse.DiscussionResponseCodec.encode(obj.success, output);
565
+ DiscussionServiceResponse.DiscussionServiceResponseCodec.encode(obj.success, output);
567
566
  output.writeFieldEnd();
568
567
  }
569
568
  output.writeFieldStop();
@@ -583,7 +582,7 @@ exports.Reply__ResultCodec = {
583
582
  switch (fieldId) {
584
583
  case 0:
585
584
  if (fieldType === thrift.TType.STRUCT) {
586
- const value_17 = DiscussionResponse.DiscussionResponseCodec.decode(input);
585
+ const value_17 = DiscussionServiceResponse.DiscussionServiceResponseCodec.decode(input);
587
586
  _args.success = value_17;
588
587
  }
589
588
  else {
@@ -608,7 +607,7 @@ class Reply__Result extends thrift.StructLike {
608
607
  this._annotations = {};
609
608
  this._fieldAnnotations = {};
610
609
  if (args.success != null) {
611
- const value_18 = DiscussionResponse.DiscussionResponseCodec.create(args.success);
610
+ const value_18 = DiscussionServiceResponse.DiscussionServiceResponseCodec.create(args.success);
612
611
  this.success = value_18;
613
612
  }
614
613
  }
@@ -631,7 +630,7 @@ exports.GetUserProfile__ResultCodec = {
631
630
  output.writeStructBegin("GetUserProfile__Result");
632
631
  if (obj.success != null) {
633
632
  output.writeFieldBegin("success", thrift.TType.STRUCT, 0);
634
- GetUserProfileResponse.GetUserProfileResponseCodec.encode(obj.success, output);
633
+ DiscussionServiceResponse.DiscussionServiceResponseCodec.encode(obj.success, output);
635
634
  output.writeFieldEnd();
636
635
  }
637
636
  output.writeFieldStop();
@@ -651,7 +650,7 @@ exports.GetUserProfile__ResultCodec = {
651
650
  switch (fieldId) {
652
651
  case 0:
653
652
  if (fieldType === thrift.TType.STRUCT) {
654
- const value_19 = GetUserProfileResponse.GetUserProfileResponseCodec.decode(input);
653
+ const value_19 = DiscussionServiceResponse.DiscussionServiceResponseCodec.decode(input);
655
654
  _args.success = value_19;
656
655
  }
657
656
  else {
@@ -676,7 +675,7 @@ class GetUserProfile__Result extends thrift.StructLike {
676
675
  this._annotations = {};
677
676
  this._fieldAnnotations = {};
678
677
  if (args.success != null) {
679
- const value_20 = GetUserProfileResponse.GetUserProfileResponseCodec.create(args.success);
678
+ const value_20 = DiscussionServiceResponse.DiscussionServiceResponseCodec.create(args.success);
680
679
  this.success = value_20;
681
680
  }
682
681
  }
@@ -0,0 +1,27 @@
1
+ import * as thrift from "@creditkarma/thrift-server-core";
2
+ import * as DiscussionNativeError from "./DiscussionNativeError";
3
+ export declare enum DiscussionServiceResponseType {
4
+ DiscussionServiceResponseWithResponse = "response",
5
+ DiscussionServiceResponseWithError = "error"
6
+ }
7
+ export type DiscussionServiceResponse = IDiscussionServiceResponseWithResponse | IDiscussionServiceResponseWithError;
8
+ export interface IDiscussionServiceResponseWithResponse {
9
+ __type: DiscussionServiceResponseType.DiscussionServiceResponseWithResponse;
10
+ response: string;
11
+ error?: undefined;
12
+ }
13
+ export interface IDiscussionServiceResponseWithError {
14
+ __type: DiscussionServiceResponseType.DiscussionServiceResponseWithError;
15
+ response?: undefined;
16
+ error: DiscussionNativeError.DiscussionNativeError;
17
+ }
18
+ export type DiscussionServiceResponseArgs = IDiscussionServiceResponseWithResponseArgs | IDiscussionServiceResponseWithErrorArgs;
19
+ export interface IDiscussionServiceResponseWithResponseArgs {
20
+ response: string;
21
+ error?: undefined;
22
+ }
23
+ export interface IDiscussionServiceResponseWithErrorArgs {
24
+ response?: undefined;
25
+ error: DiscussionNativeError.DiscussionNativeError;
26
+ }
27
+ export declare const DiscussionServiceResponseCodec: thrift.IStructToolkit<DiscussionServiceResponseArgs, DiscussionServiceResponse>;
@@ -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.DiscussionResponseCodec = exports.DiscussionResponseType = void 0;
26
+ exports.DiscussionServiceResponseCodec = exports.DiscussionServiceResponseType = void 0;
27
27
  /* tslint:disable */
28
28
  /* eslint-disable */
29
29
  /*
@@ -31,19 +31,18 @@ exports.DiscussionResponseCodec = exports.DiscussionResponseType = void 0;
31
31
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
32
32
  */
33
33
  const thrift = __importStar(require("@creditkarma/thrift-server-core"));
34
- const DiscussionApiResponse = __importStar(require("./DiscussionApiResponse"));
35
- var DiscussionResponseType;
36
- (function (DiscussionResponseType) {
37
- DiscussionResponseType["DiscussionResponseWithResponse"] = "response";
38
- DiscussionResponseType["DiscussionResponseWithError"] = "error";
39
- })(DiscussionResponseType || (exports.DiscussionResponseType = DiscussionResponseType = {}));
40
- exports.DiscussionResponseCodec = {
34
+ var DiscussionServiceResponseType;
35
+ (function (DiscussionServiceResponseType) {
36
+ DiscussionServiceResponseType["DiscussionServiceResponseWithResponse"] = "response";
37
+ DiscussionServiceResponseType["DiscussionServiceResponseWithError"] = "error";
38
+ })(DiscussionServiceResponseType || (exports.DiscussionServiceResponseType = DiscussionServiceResponseType = {}));
39
+ exports.DiscussionServiceResponseCodec = {
41
40
  create(args) {
42
41
  let _fieldsSet = 0;
43
42
  let _returnValue = null;
44
43
  if (args.response != null) {
45
44
  _fieldsSet++;
46
- const value_1 = new DiscussionApiResponse.DiscussionApiResponse(args.response);
45
+ const value_1 = args.response;
47
46
  _returnValue = { response: value_1 };
48
47
  }
49
48
  if (args.error != null) {
@@ -60,13 +59,13 @@ exports.DiscussionResponseCodec = {
60
59
  if (_returnValue !== null) {
61
60
  if (_returnValue.response !== undefined) {
62
61
  return {
63
- __type: DiscussionResponseType.DiscussionResponseWithResponse,
62
+ __type: DiscussionServiceResponseType.DiscussionServiceResponseWithResponse,
64
63
  response: _returnValue.response
65
64
  };
66
65
  }
67
66
  else {
68
67
  return {
69
- __type: DiscussionResponseType.DiscussionResponseWithError,
68
+ __type: DiscussionServiceResponseType.DiscussionServiceResponseWithError,
70
69
  error: _returnValue.error
71
70
  };
72
71
  }
@@ -81,11 +80,11 @@ exports.DiscussionResponseCodec = {
81
80
  response: args.response,
82
81
  error: args.error
83
82
  };
84
- output.writeStructBegin("DiscussionResponse");
83
+ output.writeStructBegin("DiscussionServiceResponse");
85
84
  if (obj.response != null) {
86
85
  _fieldsSet++;
87
- output.writeFieldBegin("response", thrift.TType.STRUCT, 1);
88
- DiscussionApiResponse.DiscussionApiResponseCodec.encode(obj.response, output);
86
+ output.writeFieldBegin("response", thrift.TType.STRING, 1);
87
+ output.writeString(obj.response);
89
88
  output.writeFieldEnd();
90
89
  }
91
90
  if (obj.error != null) {
@@ -117,9 +116,9 @@ exports.DiscussionResponseCodec = {
117
116
  }
118
117
  switch (fieldId) {
119
118
  case 1:
120
- if (fieldType === thrift.TType.STRUCT) {
119
+ if (fieldType === thrift.TType.STRING) {
121
120
  _fieldsSet++;
122
- const value_3 = DiscussionApiResponse.DiscussionApiResponseCodec.decode(input);
121
+ const value_3 = input.readString();
123
122
  _returnValue = { response: value_3 };
124
123
  }
125
124
  else {
@@ -152,13 +151,13 @@ exports.DiscussionResponseCodec = {
152
151
  if (_returnValue !== null) {
153
152
  if (_returnValue.response !== undefined) {
154
153
  return {
155
- __type: DiscussionResponseType.DiscussionResponseWithResponse,
154
+ __type: DiscussionServiceResponseType.DiscussionServiceResponseWithResponse,
156
155
  response: _returnValue.response
157
156
  };
158
157
  }
159
158
  else {
160
159
  return {
161
- __type: DiscussionResponseType.DiscussionResponseWithError,
160
+ __type: DiscussionServiceResponseType.DiscussionServiceResponseWithError,
162
161
  error: _returnValue.error
163
162
  };
164
163
  }
@@ -0,0 +1,9 @@
1
+ export declare enum MediaEvent {
2
+ request = 0,
3
+ ready = 1,
4
+ play = 2,
5
+ percent25 = 3,
6
+ percent50 = 4,
7
+ percent75 = 5,
8
+ end = 6
9
+ }
package/MediaEvent.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MediaEvent = void 0;
4
+ /* tslint:disable */
5
+ /* eslint-disable */
6
+ /*
7
+ * Autogenerated by @creditkarma/thrift-typescript v3.7.6
8
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
9
+ */
10
+ var MediaEvent;
11
+ (function (MediaEvent) {
12
+ MediaEvent[MediaEvent["request"] = 0] = "request";
13
+ MediaEvent[MediaEvent["ready"] = 1] = "ready";
14
+ MediaEvent[MediaEvent["play"] = 2] = "play";
15
+ MediaEvent[MediaEvent["percent25"] = 3] = "percent25";
16
+ MediaEvent[MediaEvent["percent50"] = 4] = "percent50";
17
+ MediaEvent[MediaEvent["percent75"] = 5] = "percent75";
18
+ MediaEvent[MediaEvent["end"] = 6] = "end";
19
+ })(MediaEvent || (exports.MediaEvent = MediaEvent = {}));
@@ -0,0 +1,21 @@
1
+ import * as thrift from "@creditkarma/thrift-server-core";
2
+ import * as MediaEvent from "./MediaEvent";
3
+ export interface IVideoEvent {
4
+ videoId: string;
5
+ event: MediaEvent.MediaEvent;
6
+ }
7
+ export interface IVideoEventArgs {
8
+ videoId: string;
9
+ event: MediaEvent.MediaEvent;
10
+ }
11
+ export declare const VideoEventCodec: thrift.IStructCodec<IVideoEventArgs, IVideoEvent>;
12
+ export declare class VideoEvent extends thrift.StructLike implements IVideoEvent {
13
+ videoId: string;
14
+ event: MediaEvent.MediaEvent;
15
+ readonly _annotations: thrift.IThriftAnnotations;
16
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
17
+ constructor(args: IVideoEventArgs);
18
+ static read(input: thrift.TProtocol): VideoEvent;
19
+ static write(args: IVideoEventArgs, output: thrift.TProtocol): void;
20
+ write(output: thrift.TProtocol): void;
21
+ }
@@ -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.DiscussionBadge = exports.DiscussionBadgeCodec = void 0;
26
+ exports.VideoEvent = exports.VideoEventCodec = void 0;
27
27
  /* tslint:disable */
28
28
  /* eslint-disable */
29
29
  /*
@@ -31,19 +31,28 @@ exports.DiscussionBadge = exports.DiscussionBadgeCodec = void 0;
31
31
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
32
32
  */
33
33
  const thrift = __importStar(require("@creditkarma/thrift-server-core"));
34
- exports.DiscussionBadgeCodec = {
34
+ exports.VideoEventCodec = {
35
35
  encode(args, output) {
36
36
  const obj = {
37
- name: args.name
37
+ videoId: args.videoId,
38
+ event: args.event
38
39
  };
39
- output.writeStructBegin("DiscussionBadge");
40
- if (obj.name != null) {
41
- output.writeFieldBegin("name", thrift.TType.STRING, 1);
42
- output.writeString(obj.name);
40
+ output.writeStructBegin("VideoEvent");
41
+ if (obj.videoId != null) {
42
+ output.writeFieldBegin("videoId", thrift.TType.STRING, 1);
43
+ output.writeString(obj.videoId);
43
44
  output.writeFieldEnd();
44
45
  }
45
46
  else {
46
- throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[name] is unset!");
47
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[videoId] is unset!");
48
+ }
49
+ if (obj.event != null) {
50
+ output.writeFieldBegin("event", thrift.TType.I32, 2);
51
+ output.writeI32(obj.event);
52
+ output.writeFieldEnd();
53
+ }
54
+ else {
55
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[event] is unset!");
47
56
  }
48
57
  output.writeFieldStop();
49
58
  output.writeStructEnd();
@@ -63,7 +72,16 @@ exports.DiscussionBadgeCodec = {
63
72
  case 1:
64
73
  if (fieldType === thrift.TType.STRING) {
65
74
  const value_1 = input.readString();
66
- _args.name = value_1;
75
+ _args.videoId = value_1;
76
+ }
77
+ else {
78
+ input.skip(fieldType);
79
+ }
80
+ break;
81
+ case 2:
82
+ if (fieldType === thrift.TType.I32) {
83
+ const value_2 = input.readI32();
84
+ _args.event = value_2;
67
85
  }
68
86
  else {
69
87
  input.skip(fieldType);
@@ -76,37 +94,45 @@ exports.DiscussionBadgeCodec = {
76
94
  input.readFieldEnd();
77
95
  }
78
96
  input.readStructEnd();
79
- if (_args.name !== undefined) {
97
+ if (_args.videoId !== undefined && _args.event !== undefined) {
80
98
  return {
81
- name: _args.name
99
+ videoId: _args.videoId,
100
+ event: _args.event
82
101
  };
83
102
  }
84
103
  else {
85
- throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read DiscussionBadge from input");
104
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read VideoEvent from input");
86
105
  }
87
106
  }
88
107
  };
89
- class DiscussionBadge extends thrift.StructLike {
108
+ class VideoEvent extends thrift.StructLike {
90
109
  constructor(args) {
91
110
  super();
92
111
  this._annotations = {};
93
112
  this._fieldAnnotations = {};
94
- if (args.name != null) {
95
- const value_2 = args.name;
96
- this.name = value_2;
113
+ if (args.videoId != null) {
114
+ const value_3 = args.videoId;
115
+ this.videoId = value_3;
116
+ }
117
+ else {
118
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[videoId] is unset!");
119
+ }
120
+ if (args.event != null) {
121
+ const value_4 = args.event;
122
+ this.event = value_4;
97
123
  }
98
124
  else {
99
- throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[name] is unset!");
125
+ throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[event] is unset!");
100
126
  }
101
127
  }
102
128
  static read(input) {
103
- return new DiscussionBadge(exports.DiscussionBadgeCodec.decode(input));
129
+ return new VideoEvent(exports.VideoEventCodec.decode(input));
104
130
  }
105
131
  static write(args, output) {
106
- return exports.DiscussionBadgeCodec.encode(args, output);
132
+ return exports.VideoEventCodec.encode(args, output);
107
133
  }
108
134
  write(output) {
109
- return exports.DiscussionBadgeCodec.encode(this, output);
135
+ return exports.VideoEventCodec.encode(this, output);
110
136
  }
111
137
  }
112
- exports.DiscussionBadge = DiscussionBadge;
138
+ exports.VideoEvent = VideoEvent;
package/Videos.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  import * as thrift from "@creditkarma/thrift-server-core";
4
4
  import * as VideoSlot from "./VideoSlot";
5
+ import * as VideoEvent from "./VideoEvent";
5
6
  export declare const serviceName: string;
6
7
  export declare const annotations: thrift.IThriftAnnotations;
7
8
  export declare const methodAnnotations: thrift.IMethodAnnotations;
@@ -41,6 +42,35 @@ export declare class UpdateVideos__Args extends thrift.StructLike implements IUp
41
42
  static write(args: IUpdateVideos__ArgsArgs, output: thrift.TProtocol): void;
42
43
  write(output: thrift.TProtocol): void;
43
44
  }
45
+ export interface ISendVideoEvent__Args {
46
+ videoEvent: VideoEvent.IVideoEvent;
47
+ }
48
+ export interface ISendVideoEvent__ArgsArgs {
49
+ videoEvent: VideoEvent.IVideoEventArgs;
50
+ }
51
+ export declare const SendVideoEvent__ArgsCodec: thrift.IStructCodec<ISendVideoEvent__ArgsArgs, ISendVideoEvent__Args>;
52
+ export declare class SendVideoEvent__Args extends thrift.StructLike implements ISendVideoEvent__Args {
53
+ videoEvent: VideoEvent.IVideoEvent;
54
+ readonly _annotations: thrift.IThriftAnnotations;
55
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
56
+ constructor(args: ISendVideoEvent__ArgsArgs);
57
+ static read(input: thrift.TProtocol): SendVideoEvent__Args;
58
+ static write(args: ISendVideoEvent__ArgsArgs, output: thrift.TProtocol): void;
59
+ write(output: thrift.TProtocol): void;
60
+ }
61
+ export interface IFullscreen__Args {
62
+ }
63
+ export interface IFullscreen__ArgsArgs {
64
+ }
65
+ export declare const Fullscreen__ArgsCodec: thrift.IStructCodec<IFullscreen__ArgsArgs, IFullscreen__Args>;
66
+ export declare class Fullscreen__Args extends thrift.StructLike implements IFullscreen__Args {
67
+ readonly _annotations: thrift.IThriftAnnotations;
68
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
69
+ constructor(args?: IFullscreen__ArgsArgs);
70
+ static read(input: thrift.TProtocol): Fullscreen__Args;
71
+ static write(args: IFullscreen__ArgsArgs, output: thrift.TProtocol): void;
72
+ write(output: thrift.TProtocol): void;
73
+ }
44
74
  export interface IInsertVideos__Result {
45
75
  success?: void;
46
76
  }
@@ -73,6 +103,38 @@ export declare class UpdateVideos__Result extends thrift.StructLike implements I
73
103
  static write(args: IUpdateVideos__ResultArgs, output: thrift.TProtocol): void;
74
104
  write(output: thrift.TProtocol): void;
75
105
  }
106
+ export interface ISendVideoEvent__Result {
107
+ success?: void;
108
+ }
109
+ export interface ISendVideoEvent__ResultArgs {
110
+ success?: void;
111
+ }
112
+ export declare const SendVideoEvent__ResultCodec: thrift.IStructCodec<ISendVideoEvent__ResultArgs, ISendVideoEvent__Result>;
113
+ export declare class SendVideoEvent__Result extends thrift.StructLike implements ISendVideoEvent__Result {
114
+ success?: void;
115
+ readonly _annotations: thrift.IThriftAnnotations;
116
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
117
+ constructor(args?: ISendVideoEvent__ResultArgs);
118
+ static read(input: thrift.TProtocol): SendVideoEvent__Result;
119
+ static write(args: ISendVideoEvent__ResultArgs, output: thrift.TProtocol): void;
120
+ write(output: thrift.TProtocol): void;
121
+ }
122
+ export interface IFullscreen__Result {
123
+ success?: void;
124
+ }
125
+ export interface IFullscreen__ResultArgs {
126
+ success?: void;
127
+ }
128
+ export declare const Fullscreen__ResultCodec: thrift.IStructCodec<IFullscreen__ResultArgs, IFullscreen__Result>;
129
+ export declare class Fullscreen__Result extends thrift.StructLike implements IFullscreen__Result {
130
+ success?: void;
131
+ readonly _annotations: thrift.IThriftAnnotations;
132
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
133
+ constructor(args?: IFullscreen__ResultArgs);
134
+ static read(input: thrift.TProtocol): Fullscreen__Result;
135
+ static write(args: IFullscreen__ResultArgs, output: thrift.TProtocol): void;
136
+ write(output: thrift.TProtocol): void;
137
+ }
76
138
  export declare class Client<Context = any> extends thrift.ThriftClient<Context> {
77
139
  static readonly serviceName: string;
78
140
  static readonly annotations: thrift.IThriftAnnotations;
@@ -87,10 +149,14 @@ export declare class Client<Context = any> extends thrift.ThriftClient<Context>
87
149
  };
88
150
  insertVideos(videoSlots: Array<VideoSlot.IVideoSlotArgs>, context?: Context): Promise<void>;
89
151
  updateVideos(videoSlots: Array<VideoSlot.IVideoSlotArgs>, context?: Context): Promise<void>;
152
+ sendVideoEvent(videoEvent: VideoEvent.IVideoEventArgs, context?: Context): Promise<void>;
153
+ fullscreen(context?: Context): Promise<void>;
90
154
  }
91
155
  export interface IHandler<Context = any> {
92
156
  insertVideos(videoSlots: Array<VideoSlot.IVideoSlot>, context?: Context): void | Promise<void>;
93
157
  updateVideos(videoSlots: Array<VideoSlot.IVideoSlot>, context?: Context): void | Promise<void>;
158
+ sendVideoEvent(videoEvent: VideoEvent.IVideoEvent, context?: Context): void | Promise<void>;
159
+ fullscreen(context?: Context): void | Promise<void>;
94
160
  }
95
161
  export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
96
162
  protected readonly _handler: IHandler<Context>;
@@ -106,4 +172,6 @@ export declare class Processor<Context = any> extends thrift.ThriftProcessor<Con
106
172
  process(input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
107
173
  process_insertVideos(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
108
174
  process_updateVideos(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
175
+ process_sendVideoEvent(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
176
+ process_fullscreen(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
109
177
  }