@guardian/bridget 5.0.0 → 6.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 +21 -22
- package/Discussion.js +13 -14
- package/DiscussionServiceResponse.d.ts +27 -0
- package/{DiscussionResponse.js → DiscussionServiceResponse.js} +17 -18
- package/index.d.ts +1 -5
- package/index.js +1 -5
- package/package.json +1 -1
- package/DiscussionApiResponse.d.ts +0 -26
- package/DiscussionApiResponse.js +0 -184
- package/DiscussionBadge.d.ts +0 -17
- package/DiscussionBadge.js +0 -112
- package/DiscussionResponse.d.ts +0 -28
- package/DiscussionUserProfile.d.ts +0 -45
- package/DiscussionUserProfile.js +0 -362
- package/GetUserProfileResponse.d.ts +0 -28
- package/GetUserProfileResponse.js +0 -170
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
|
|
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?:
|
|
83
|
+
success?: DiscussionServiceResponse.DiscussionServiceResponse;
|
|
85
84
|
}
|
|
86
85
|
export interface IRecommend__ResultArgs {
|
|
87
|
-
success?:
|
|
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?:
|
|
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?:
|
|
99
|
+
success?: DiscussionServiceResponse.DiscussionServiceResponse;
|
|
101
100
|
}
|
|
102
101
|
export interface IComment__ResultArgs {
|
|
103
|
-
success?:
|
|
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?:
|
|
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?:
|
|
115
|
+
success?: DiscussionServiceResponse.DiscussionServiceResponse;
|
|
117
116
|
}
|
|
118
117
|
export interface IReply__ResultArgs {
|
|
119
|
-
success?:
|
|
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?:
|
|
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?:
|
|
131
|
+
success?: DiscussionServiceResponse.DiscussionServiceResponse;
|
|
133
132
|
}
|
|
134
133
|
export interface IGetUserProfile__ResultArgs {
|
|
135
|
-
success?:
|
|
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?:
|
|
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<
|
|
160
|
-
comment(shortUrl: string, body: string, context?: Context): Promise<
|
|
161
|
-
reply(shortUrl: string, body: string, parentCommentId: string, context?: Context): Promise<
|
|
162
|
-
getUserProfile(context?: Context): Promise<
|
|
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):
|
|
166
|
-
comment(shortUrl: string, body: string, context?: Context):
|
|
167
|
-
reply(shortUrl: string, body: string, parentCommentId: string, context?: Context):
|
|
168
|
-
getUserProfile(context?: Context):
|
|
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
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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.
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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 =
|
|
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:
|
|
62
|
+
__type: DiscussionServiceResponseType.DiscussionServiceResponseWithResponse,
|
|
64
63
|
response: _returnValue.response
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
else {
|
|
68
67
|
return {
|
|
69
|
-
__type:
|
|
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("
|
|
83
|
+
output.writeStructBegin("DiscussionServiceResponse");
|
|
85
84
|
if (obj.response != null) {
|
|
86
85
|
_fieldsSet++;
|
|
87
|
-
output.writeFieldBegin("response", thrift.TType.
|
|
88
|
-
|
|
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.
|
|
119
|
+
if (fieldType === thrift.TType.STRING) {
|
|
121
120
|
_fieldsSet++;
|
|
122
|
-
const value_3 =
|
|
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:
|
|
154
|
+
__type: DiscussionServiceResponseType.DiscussionServiceResponseWithResponse,
|
|
156
155
|
response: _returnValue.response
|
|
157
156
|
};
|
|
158
157
|
}
|
|
159
158
|
else {
|
|
160
159
|
return {
|
|
161
|
-
__type:
|
|
160
|
+
__type: DiscussionServiceResponseType.DiscussionServiceResponseWithError,
|
|
162
161
|
error: _returnValue.error
|
|
163
162
|
};
|
|
164
163
|
}
|
package/index.d.ts
CHANGED
|
@@ -11,12 +11,8 @@ export * from "./MaybeEpic";
|
|
|
11
11
|
export * from "./VideoSlot";
|
|
12
12
|
export * from "./MetricPaint";
|
|
13
13
|
export * from "./MetricFont";
|
|
14
|
-
export * from "./DiscussionBadge";
|
|
15
|
-
export * from "./DiscussionUserProfile";
|
|
16
|
-
export * from "./DiscussionApiResponse";
|
|
17
14
|
export * from "./Metric";
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./DiscussionResponse";
|
|
15
|
+
export * from "./DiscussionServiceResponse";
|
|
20
16
|
import * as Environment from "./Environment";
|
|
21
17
|
export { Environment as Environment };
|
|
22
18
|
import * as Commercial from "./Commercial";
|
package/index.js
CHANGED
|
@@ -46,12 +46,8 @@ __exportStar(require("./MaybeEpic"), exports);
|
|
|
46
46
|
__exportStar(require("./VideoSlot"), exports);
|
|
47
47
|
__exportStar(require("./MetricPaint"), exports);
|
|
48
48
|
__exportStar(require("./MetricFont"), exports);
|
|
49
|
-
__exportStar(require("./DiscussionBadge"), exports);
|
|
50
|
-
__exportStar(require("./DiscussionUserProfile"), exports);
|
|
51
|
-
__exportStar(require("./DiscussionApiResponse"), exports);
|
|
52
49
|
__exportStar(require("./Metric"), exports);
|
|
53
|
-
__exportStar(require("./
|
|
54
|
-
__exportStar(require("./DiscussionResponse"), exports);
|
|
50
|
+
__exportStar(require("./DiscussionServiceResponse"), exports);
|
|
55
51
|
const Environment = __importStar(require("./Environment"));
|
|
56
52
|
exports.Environment = Environment;
|
|
57
53
|
const Commercial = __importStar(require("./Commercial"));
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as thrift from "@creditkarma/thrift-server-core";
|
|
2
|
-
export interface IDiscussionApiResponse {
|
|
3
|
-
status: string;
|
|
4
|
-
statusCode: number;
|
|
5
|
-
message: string;
|
|
6
|
-
errorCode?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface IDiscussionApiResponseArgs {
|
|
9
|
-
status: string;
|
|
10
|
-
statusCode: number;
|
|
11
|
-
message: string;
|
|
12
|
-
errorCode?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const DiscussionApiResponseCodec: thrift.IStructCodec<IDiscussionApiResponseArgs, IDiscussionApiResponse>;
|
|
15
|
-
export declare class DiscussionApiResponse extends thrift.StructLike implements IDiscussionApiResponse {
|
|
16
|
-
status: string;
|
|
17
|
-
statusCode: number;
|
|
18
|
-
message: string;
|
|
19
|
-
errorCode?: string;
|
|
20
|
-
readonly _annotations: thrift.IThriftAnnotations;
|
|
21
|
-
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
22
|
-
constructor(args: IDiscussionApiResponseArgs);
|
|
23
|
-
static read(input: thrift.TProtocol): DiscussionApiResponse;
|
|
24
|
-
static write(args: IDiscussionApiResponseArgs, output: thrift.TProtocol): void;
|
|
25
|
-
write(output: thrift.TProtocol): void;
|
|
26
|
-
}
|
package/DiscussionApiResponse.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
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.DiscussionApiResponse = exports.DiscussionApiResponseCodec = 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.DiscussionApiResponseCodec = {
|
|
35
|
-
encode(args, output) {
|
|
36
|
-
const obj = {
|
|
37
|
-
status: args.status,
|
|
38
|
-
statusCode: args.statusCode,
|
|
39
|
-
message: args.message,
|
|
40
|
-
errorCode: args.errorCode
|
|
41
|
-
};
|
|
42
|
-
output.writeStructBegin("DiscussionApiResponse");
|
|
43
|
-
if (obj.status != null) {
|
|
44
|
-
output.writeFieldBegin("status", thrift.TType.STRING, 1);
|
|
45
|
-
output.writeString(obj.status);
|
|
46
|
-
output.writeFieldEnd();
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[status] is unset!");
|
|
50
|
-
}
|
|
51
|
-
if (obj.statusCode != null) {
|
|
52
|
-
output.writeFieldBegin("statusCode", thrift.TType.I32, 2);
|
|
53
|
-
output.writeI32(obj.statusCode);
|
|
54
|
-
output.writeFieldEnd();
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[statusCode] is unset!");
|
|
58
|
-
}
|
|
59
|
-
if (obj.message != null) {
|
|
60
|
-
output.writeFieldBegin("message", thrift.TType.STRING, 3);
|
|
61
|
-
output.writeString(obj.message);
|
|
62
|
-
output.writeFieldEnd();
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[message] is unset!");
|
|
66
|
-
}
|
|
67
|
-
if (obj.errorCode != null) {
|
|
68
|
-
output.writeFieldBegin("errorCode", thrift.TType.STRING, 4);
|
|
69
|
-
output.writeString(obj.errorCode);
|
|
70
|
-
output.writeFieldEnd();
|
|
71
|
-
}
|
|
72
|
-
output.writeFieldStop();
|
|
73
|
-
output.writeStructEnd();
|
|
74
|
-
return;
|
|
75
|
-
},
|
|
76
|
-
decode(input) {
|
|
77
|
-
let _args = {};
|
|
78
|
-
input.readStructBegin();
|
|
79
|
-
while (true) {
|
|
80
|
-
const ret = input.readFieldBegin();
|
|
81
|
-
const fieldType = ret.fieldType;
|
|
82
|
-
const fieldId = ret.fieldId;
|
|
83
|
-
if (fieldType === thrift.TType.STOP) {
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
switch (fieldId) {
|
|
87
|
-
case 1:
|
|
88
|
-
if (fieldType === thrift.TType.STRING) {
|
|
89
|
-
const value_1 = input.readString();
|
|
90
|
-
_args.status = value_1;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
input.skip(fieldType);
|
|
94
|
-
}
|
|
95
|
-
break;
|
|
96
|
-
case 2:
|
|
97
|
-
if (fieldType === thrift.TType.I32) {
|
|
98
|
-
const value_2 = input.readI32();
|
|
99
|
-
_args.statusCode = value_2;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
input.skip(fieldType);
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
105
|
-
case 3:
|
|
106
|
-
if (fieldType === thrift.TType.STRING) {
|
|
107
|
-
const value_3 = input.readString();
|
|
108
|
-
_args.message = value_3;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
input.skip(fieldType);
|
|
112
|
-
}
|
|
113
|
-
break;
|
|
114
|
-
case 4:
|
|
115
|
-
if (fieldType === thrift.TType.STRING) {
|
|
116
|
-
const value_4 = input.readString();
|
|
117
|
-
_args.errorCode = value_4;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
input.skip(fieldType);
|
|
121
|
-
}
|
|
122
|
-
break;
|
|
123
|
-
default: {
|
|
124
|
-
input.skip(fieldType);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
input.readFieldEnd();
|
|
128
|
-
}
|
|
129
|
-
input.readStructEnd();
|
|
130
|
-
if (_args.status !== undefined && _args.statusCode !== undefined && _args.message !== undefined) {
|
|
131
|
-
return {
|
|
132
|
-
status: _args.status,
|
|
133
|
-
statusCode: _args.statusCode,
|
|
134
|
-
message: _args.message,
|
|
135
|
-
errorCode: _args.errorCode
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read DiscussionApiResponse from input");
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
class DiscussionApiResponse extends thrift.StructLike {
|
|
144
|
-
constructor(args) {
|
|
145
|
-
super();
|
|
146
|
-
this._annotations = {};
|
|
147
|
-
this._fieldAnnotations = {};
|
|
148
|
-
if (args.status != null) {
|
|
149
|
-
const value_5 = args.status;
|
|
150
|
-
this.status = value_5;
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[status] is unset!");
|
|
154
|
-
}
|
|
155
|
-
if (args.statusCode != null) {
|
|
156
|
-
const value_6 = args.statusCode;
|
|
157
|
-
this.statusCode = value_6;
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[statusCode] is unset!");
|
|
161
|
-
}
|
|
162
|
-
if (args.message != null) {
|
|
163
|
-
const value_7 = args.message;
|
|
164
|
-
this.message = value_7;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[message] is unset!");
|
|
168
|
-
}
|
|
169
|
-
if (args.errorCode != null) {
|
|
170
|
-
const value_8 = args.errorCode;
|
|
171
|
-
this.errorCode = value_8;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
static read(input) {
|
|
175
|
-
return new DiscussionApiResponse(exports.DiscussionApiResponseCodec.decode(input));
|
|
176
|
-
}
|
|
177
|
-
static write(args, output) {
|
|
178
|
-
return exports.DiscussionApiResponseCodec.encode(args, output);
|
|
179
|
-
}
|
|
180
|
-
write(output) {
|
|
181
|
-
return exports.DiscussionApiResponseCodec.encode(this, output);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
exports.DiscussionApiResponse = DiscussionApiResponse;
|
package/DiscussionBadge.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as thrift from "@creditkarma/thrift-server-core";
|
|
2
|
-
export interface IDiscussionBadge {
|
|
3
|
-
name: string;
|
|
4
|
-
}
|
|
5
|
-
export interface IDiscussionBadgeArgs {
|
|
6
|
-
name: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const DiscussionBadgeCodec: thrift.IStructCodec<IDiscussionBadgeArgs, IDiscussionBadge>;
|
|
9
|
-
export declare class DiscussionBadge extends thrift.StructLike implements IDiscussionBadge {
|
|
10
|
-
name: string;
|
|
11
|
-
readonly _annotations: thrift.IThriftAnnotations;
|
|
12
|
-
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
13
|
-
constructor(args: IDiscussionBadgeArgs);
|
|
14
|
-
static read(input: thrift.TProtocol): DiscussionBadge;
|
|
15
|
-
static write(args: IDiscussionBadgeArgs, output: thrift.TProtocol): void;
|
|
16
|
-
write(output: thrift.TProtocol): void;
|
|
17
|
-
}
|