@guardian/bridget 3.0.0 → 5.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
@@ -2,6 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  import * as thrift from "@creditkarma/thrift-server-core";
4
4
  import * as DiscussionResponse from "./DiscussionResponse";
5
+ import * as GetUserProfileResponse from "./GetUserProfileResponse";
5
6
  export declare const serviceName: string;
6
7
  export declare const annotations: thrift.IThriftAnnotations;
7
8
  export declare const methodAnnotations: thrift.IMethodAnnotations;
@@ -25,6 +26,60 @@ export declare class Recommend__Args extends thrift.StructLike implements IRecom
25
26
  static write(args: IRecommend__ArgsArgs, output: thrift.TProtocol): void;
26
27
  write(output: thrift.TProtocol): void;
27
28
  }
29
+ export interface IComment__Args {
30
+ shortUrl: string;
31
+ body: string;
32
+ }
33
+ export interface IComment__ArgsArgs {
34
+ shortUrl: string;
35
+ body: string;
36
+ }
37
+ export declare const Comment__ArgsCodec: thrift.IStructCodec<IComment__ArgsArgs, IComment__Args>;
38
+ export declare class Comment__Args extends thrift.StructLike implements IComment__Args {
39
+ shortUrl: string;
40
+ body: string;
41
+ readonly _annotations: thrift.IThriftAnnotations;
42
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
43
+ constructor(args: IComment__ArgsArgs);
44
+ static read(input: thrift.TProtocol): Comment__Args;
45
+ static write(args: IComment__ArgsArgs, output: thrift.TProtocol): void;
46
+ write(output: thrift.TProtocol): void;
47
+ }
48
+ export interface IReply__Args {
49
+ shortUrl: string;
50
+ body: string;
51
+ parentCommentId: string;
52
+ }
53
+ export interface IReply__ArgsArgs {
54
+ shortUrl: string;
55
+ body: string;
56
+ parentCommentId: string;
57
+ }
58
+ export declare const Reply__ArgsCodec: thrift.IStructCodec<IReply__ArgsArgs, IReply__Args>;
59
+ export declare class Reply__Args extends thrift.StructLike implements IReply__Args {
60
+ shortUrl: string;
61
+ body: string;
62
+ parentCommentId: string;
63
+ readonly _annotations: thrift.IThriftAnnotations;
64
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
65
+ constructor(args: IReply__ArgsArgs);
66
+ static read(input: thrift.TProtocol): Reply__Args;
67
+ static write(args: IReply__ArgsArgs, output: thrift.TProtocol): void;
68
+ write(output: thrift.TProtocol): void;
69
+ }
70
+ export interface IGetUserProfile__Args {
71
+ }
72
+ export interface IGetUserProfile__ArgsArgs {
73
+ }
74
+ export declare const GetUserProfile__ArgsCodec: thrift.IStructCodec<IGetUserProfile__ArgsArgs, IGetUserProfile__Args>;
75
+ export declare class GetUserProfile__Args extends thrift.StructLike implements IGetUserProfile__Args {
76
+ readonly _annotations: thrift.IThriftAnnotations;
77
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
78
+ constructor(args?: IGetUserProfile__ArgsArgs);
79
+ static read(input: thrift.TProtocol): GetUserProfile__Args;
80
+ static write(args: IGetUserProfile__ArgsArgs, output: thrift.TProtocol): void;
81
+ write(output: thrift.TProtocol): void;
82
+ }
28
83
  export interface IRecommend__Result {
29
84
  success?: DiscussionResponse.DiscussionResponse;
30
85
  }
@@ -41,6 +96,54 @@ export declare class Recommend__Result extends thrift.StructLike implements IRec
41
96
  static write(args: IRecommend__ResultArgs, output: thrift.TProtocol): void;
42
97
  write(output: thrift.TProtocol): void;
43
98
  }
99
+ export interface IComment__Result {
100
+ success?: DiscussionResponse.DiscussionResponse;
101
+ }
102
+ export interface IComment__ResultArgs {
103
+ success?: DiscussionResponse.DiscussionResponseArgs;
104
+ }
105
+ export declare const Comment__ResultCodec: thrift.IStructCodec<IComment__ResultArgs, IComment__Result>;
106
+ export declare class Comment__Result extends thrift.StructLike implements IComment__Result {
107
+ success?: DiscussionResponse.DiscussionResponse;
108
+ readonly _annotations: thrift.IThriftAnnotations;
109
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
110
+ constructor(args?: IComment__ResultArgs);
111
+ static read(input: thrift.TProtocol): Comment__Result;
112
+ static write(args: IComment__ResultArgs, output: thrift.TProtocol): void;
113
+ write(output: thrift.TProtocol): void;
114
+ }
115
+ export interface IReply__Result {
116
+ success?: DiscussionResponse.DiscussionResponse;
117
+ }
118
+ export interface IReply__ResultArgs {
119
+ success?: DiscussionResponse.DiscussionResponseArgs;
120
+ }
121
+ export declare const Reply__ResultCodec: thrift.IStructCodec<IReply__ResultArgs, IReply__Result>;
122
+ export declare class Reply__Result extends thrift.StructLike implements IReply__Result {
123
+ success?: DiscussionResponse.DiscussionResponse;
124
+ readonly _annotations: thrift.IThriftAnnotations;
125
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
126
+ constructor(args?: IReply__ResultArgs);
127
+ static read(input: thrift.TProtocol): Reply__Result;
128
+ static write(args: IReply__ResultArgs, output: thrift.TProtocol): void;
129
+ write(output: thrift.TProtocol): void;
130
+ }
131
+ export interface IGetUserProfile__Result {
132
+ success?: GetUserProfileResponse.GetUserProfileResponse;
133
+ }
134
+ export interface IGetUserProfile__ResultArgs {
135
+ success?: GetUserProfileResponse.GetUserProfileResponseArgs;
136
+ }
137
+ export declare const GetUserProfile__ResultCodec: thrift.IStructCodec<IGetUserProfile__ResultArgs, IGetUserProfile__Result>;
138
+ export declare class GetUserProfile__Result extends thrift.StructLike implements IGetUserProfile__Result {
139
+ success?: GetUserProfileResponse.GetUserProfileResponse;
140
+ readonly _annotations: thrift.IThriftAnnotations;
141
+ readonly _fieldAnnotations: thrift.IFieldAnnotations;
142
+ constructor(args?: IGetUserProfile__ResultArgs);
143
+ static read(input: thrift.TProtocol): GetUserProfile__Result;
144
+ static write(args: IGetUserProfile__ResultArgs, output: thrift.TProtocol): void;
145
+ write(output: thrift.TProtocol): void;
146
+ }
44
147
  export declare class Client<Context = any> extends thrift.ThriftClient<Context> {
45
148
  static readonly serviceName: string;
46
149
  static readonly annotations: thrift.IThriftAnnotations;
@@ -54,9 +157,15 @@ export declare class Client<Context = any> extends thrift.ThriftClient<Context>
54
157
  [methodName: string]: number;
55
158
  };
56
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>;
57
163
  }
58
164
  export interface IHandler<Context = any> {
59
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>;
60
169
  }
61
170
  export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
62
171
  protected readonly _handler: IHandler<Context>;
@@ -71,4 +180,7 @@ export declare class Processor<Context = any> extends thrift.ThriftProcessor<Con
71
180
  constructor(handler: IHandler<Context>);
72
181
  process(input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
73
182
  process_recommend(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
183
+ process_comment(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
184
+ process_reply(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
185
+ process_getUserProfile(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
74
186
  }