@guardian/bridget 8.9.1 → 8.9.2-2026-05-11
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/FootballMatch.d.ts +21 -0
- package/FootballMatch.js +139 -0
- package/FootballTeam.d.ts +20 -0
- package/FootballTeam.js +138 -0
- package/MatchNotifications.d.ts +75 -0
- package/MatchNotifications.js +311 -0
- package/MatchNotificationsAvailability.d.ts +20 -0
- package/MatchNotificationsAvailability.js +132 -0
- package/index.d.ts +5 -0
- package/index.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as thrift from "@creditkarma/thrift-server-core";
|
|
2
|
+
import * as FootballTeam from "./FootballTeam";
|
|
3
|
+
export interface IFootballMatch {
|
|
4
|
+
homeTeam: FootballTeam.IFootballTeam;
|
|
5
|
+
awayTeam: FootballTeam.IFootballTeam;
|
|
6
|
+
}
|
|
7
|
+
export interface IFootballMatchArgs {
|
|
8
|
+
homeTeam: FootballTeam.IFootballTeamArgs;
|
|
9
|
+
awayTeam: FootballTeam.IFootballTeamArgs;
|
|
10
|
+
}
|
|
11
|
+
export declare const FootballMatchCodec: thrift.IStructCodec<IFootballMatchArgs, IFootballMatch>;
|
|
12
|
+
export declare class FootballMatch extends thrift.StructLike implements IFootballMatch {
|
|
13
|
+
homeTeam: FootballTeam.IFootballTeam;
|
|
14
|
+
awayTeam: FootballTeam.IFootballTeam;
|
|
15
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
16
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
17
|
+
constructor(args: IFootballMatchArgs);
|
|
18
|
+
static read(input: thrift.TProtocol): FootballMatch;
|
|
19
|
+
static write(args: IFootballMatchArgs, output: thrift.TProtocol): void;
|
|
20
|
+
write(output: thrift.TProtocol): void;
|
|
21
|
+
}
|
package/FootballMatch.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
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.FootballMatch = exports.FootballMatchCodec = 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
|
+
const FootballTeam = __importStar(require("./FootballTeam"));
|
|
35
|
+
exports.FootballMatchCodec = {
|
|
36
|
+
encode(args, output) {
|
|
37
|
+
const obj = {
|
|
38
|
+
homeTeam: args.homeTeam,
|
|
39
|
+
awayTeam: args.awayTeam
|
|
40
|
+
};
|
|
41
|
+
output.writeStructBegin("FootballMatch");
|
|
42
|
+
if (obj.homeTeam != null) {
|
|
43
|
+
output.writeFieldBegin("homeTeam", thrift.TType.STRUCT, 1);
|
|
44
|
+
FootballTeam.FootballTeamCodec.encode(obj.homeTeam, output);
|
|
45
|
+
output.writeFieldEnd();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[homeTeam] is unset!");
|
|
49
|
+
}
|
|
50
|
+
if (obj.awayTeam != null) {
|
|
51
|
+
output.writeFieldBegin("awayTeam", thrift.TType.STRUCT, 2);
|
|
52
|
+
FootballTeam.FootballTeamCodec.encode(obj.awayTeam, output);
|
|
53
|
+
output.writeFieldEnd();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[awayTeam] is unset!");
|
|
57
|
+
}
|
|
58
|
+
output.writeFieldStop();
|
|
59
|
+
output.writeStructEnd();
|
|
60
|
+
return;
|
|
61
|
+
},
|
|
62
|
+
decode(input) {
|
|
63
|
+
let _args = {};
|
|
64
|
+
input.readStructBegin();
|
|
65
|
+
while (true) {
|
|
66
|
+
const ret = input.readFieldBegin();
|
|
67
|
+
const fieldType = ret.fieldType;
|
|
68
|
+
const fieldId = ret.fieldId;
|
|
69
|
+
if (fieldType === thrift.TType.STOP) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
switch (fieldId) {
|
|
73
|
+
case 1:
|
|
74
|
+
if (fieldType === thrift.TType.STRUCT) {
|
|
75
|
+
const value_1 = FootballTeam.FootballTeamCodec.decode(input);
|
|
76
|
+
_args.homeTeam = value_1;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
input.skip(fieldType);
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case 2:
|
|
83
|
+
if (fieldType === thrift.TType.STRUCT) {
|
|
84
|
+
const value_2 = FootballTeam.FootballTeamCodec.decode(input);
|
|
85
|
+
_args.awayTeam = value_2;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
input.skip(fieldType);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
default: {
|
|
92
|
+
input.skip(fieldType);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
input.readFieldEnd();
|
|
96
|
+
}
|
|
97
|
+
input.readStructEnd();
|
|
98
|
+
if (_args.homeTeam !== undefined && _args.awayTeam !== undefined) {
|
|
99
|
+
return {
|
|
100
|
+
homeTeam: _args.homeTeam,
|
|
101
|
+
awayTeam: _args.awayTeam
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read FootballMatch from input");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
class FootballMatch extends thrift.StructLike {
|
|
110
|
+
constructor(args) {
|
|
111
|
+
super();
|
|
112
|
+
this._annotations = {};
|
|
113
|
+
this._fieldAnnotations = {};
|
|
114
|
+
if (args.homeTeam != null) {
|
|
115
|
+
const value_3 = new FootballTeam.FootballTeam(args.homeTeam);
|
|
116
|
+
this.homeTeam = value_3;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[homeTeam] is unset!");
|
|
120
|
+
}
|
|
121
|
+
if (args.awayTeam != null) {
|
|
122
|
+
const value_4 = new FootballTeam.FootballTeam(args.awayTeam);
|
|
123
|
+
this.awayTeam = value_4;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[awayTeam] is unset!");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
static read(input) {
|
|
130
|
+
return new FootballMatch(exports.FootballMatchCodec.decode(input));
|
|
131
|
+
}
|
|
132
|
+
static write(args, output) {
|
|
133
|
+
return exports.FootballMatchCodec.encode(args, output);
|
|
134
|
+
}
|
|
135
|
+
write(output) {
|
|
136
|
+
return exports.FootballMatchCodec.encode(this, output);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.FootballMatch = FootballMatch;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as thrift from "@creditkarma/thrift-server-core";
|
|
2
|
+
export interface IFootballTeam {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IFootballTeamArgs {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const FootballTeamCodec: thrift.IStructCodec<IFootballTeamArgs, IFootballTeam>;
|
|
11
|
+
export declare class FootballTeam extends thrift.StructLike implements IFootballTeam {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
15
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
16
|
+
constructor(args: IFootballTeamArgs);
|
|
17
|
+
static read(input: thrift.TProtocol): FootballTeam;
|
|
18
|
+
static write(args: IFootballTeamArgs, output: thrift.TProtocol): void;
|
|
19
|
+
write(output: thrift.TProtocol): void;
|
|
20
|
+
}
|
package/FootballTeam.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
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.FootballTeam = exports.FootballTeamCodec = 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.FootballTeamCodec = {
|
|
35
|
+
encode(args, output) {
|
|
36
|
+
const obj = {
|
|
37
|
+
id: args.id,
|
|
38
|
+
name: args.name
|
|
39
|
+
};
|
|
40
|
+
output.writeStructBegin("FootballTeam");
|
|
41
|
+
if (obj.id != null) {
|
|
42
|
+
output.writeFieldBegin("id", thrift.TType.STRING, 1);
|
|
43
|
+
output.writeString(obj.id);
|
|
44
|
+
output.writeFieldEnd();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[id] is unset!");
|
|
48
|
+
}
|
|
49
|
+
if (obj.name != null) {
|
|
50
|
+
output.writeFieldBegin("name", thrift.TType.STRING, 2);
|
|
51
|
+
output.writeString(obj.name);
|
|
52
|
+
output.writeFieldEnd();
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[name] is unset!");
|
|
56
|
+
}
|
|
57
|
+
output.writeFieldStop();
|
|
58
|
+
output.writeStructEnd();
|
|
59
|
+
return;
|
|
60
|
+
},
|
|
61
|
+
decode(input) {
|
|
62
|
+
let _args = {};
|
|
63
|
+
input.readStructBegin();
|
|
64
|
+
while (true) {
|
|
65
|
+
const ret = input.readFieldBegin();
|
|
66
|
+
const fieldType = ret.fieldType;
|
|
67
|
+
const fieldId = ret.fieldId;
|
|
68
|
+
if (fieldType === thrift.TType.STOP) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
switch (fieldId) {
|
|
72
|
+
case 1:
|
|
73
|
+
if (fieldType === thrift.TType.STRING) {
|
|
74
|
+
const value_1 = input.readString();
|
|
75
|
+
_args.id = value_1;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
input.skip(fieldType);
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case 2:
|
|
82
|
+
if (fieldType === thrift.TType.STRING) {
|
|
83
|
+
const value_2 = input.readString();
|
|
84
|
+
_args.name = value_2;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
input.skip(fieldType);
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
default: {
|
|
91
|
+
input.skip(fieldType);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
input.readFieldEnd();
|
|
95
|
+
}
|
|
96
|
+
input.readStructEnd();
|
|
97
|
+
if (_args.id !== undefined && _args.name !== undefined) {
|
|
98
|
+
return {
|
|
99
|
+
id: _args.id,
|
|
100
|
+
name: _args.name
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read FootballTeam from input");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
class FootballTeam extends thrift.StructLike {
|
|
109
|
+
constructor(args) {
|
|
110
|
+
super();
|
|
111
|
+
this._annotations = {};
|
|
112
|
+
this._fieldAnnotations = {};
|
|
113
|
+
if (args.id != null) {
|
|
114
|
+
const value_3 = args.id;
|
|
115
|
+
this.id = value_3;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[id] is unset!");
|
|
119
|
+
}
|
|
120
|
+
if (args.name != null) {
|
|
121
|
+
const value_4 = args.name;
|
|
122
|
+
this.name = value_4;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[name] is unset!");
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
static read(input) {
|
|
129
|
+
return new FootballTeam(exports.FootballTeamCodec.decode(input));
|
|
130
|
+
}
|
|
131
|
+
static write(args, output) {
|
|
132
|
+
return exports.FootballTeamCodec.encode(args, output);
|
|
133
|
+
}
|
|
134
|
+
write(output) {
|
|
135
|
+
return exports.FootballTeamCodec.encode(this, output);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.FootballTeam = FootballTeam;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import * as thrift from "@creditkarma/thrift-server-core";
|
|
4
|
+
import * as FootballMatch from "./FootballMatch";
|
|
5
|
+
import * as MatchNotificationsAvailability from "./MatchNotificationsAvailability";
|
|
6
|
+
export declare const serviceName: string;
|
|
7
|
+
export declare const annotations: thrift.IThriftAnnotations;
|
|
8
|
+
export declare const methodAnnotations: thrift.IMethodAnnotations;
|
|
9
|
+
export declare const methodNames: Array<string>;
|
|
10
|
+
export declare const methodParameters: {
|
|
11
|
+
[methodName: string]: number;
|
|
12
|
+
};
|
|
13
|
+
export interface IIsAvailable__Args {
|
|
14
|
+
footballMatch: FootballMatch.IFootballMatch;
|
|
15
|
+
}
|
|
16
|
+
export interface IIsAvailable__ArgsArgs {
|
|
17
|
+
footballMatch: FootballMatch.IFootballMatchArgs;
|
|
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
|
+
footballMatch: FootballMatch.IFootballMatch;
|
|
22
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
23
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
24
|
+
constructor(args: IIsAvailable__ArgsArgs);
|
|
25
|
+
static read(input: thrift.TProtocol): IsAvailable__Args;
|
|
26
|
+
static write(args: IIsAvailable__ArgsArgs, output: thrift.TProtocol): void;
|
|
27
|
+
write(output: thrift.TProtocol): void;
|
|
28
|
+
}
|
|
29
|
+
export interface IIsAvailable__Result {
|
|
30
|
+
success?: MatchNotificationsAvailability.IMatchNotificationsAvailability;
|
|
31
|
+
}
|
|
32
|
+
export interface IIsAvailable__ResultArgs {
|
|
33
|
+
success?: MatchNotificationsAvailability.IMatchNotificationsAvailabilityArgs;
|
|
34
|
+
}
|
|
35
|
+
export declare const IsAvailable__ResultCodec: thrift.IStructCodec<IIsAvailable__ResultArgs, IIsAvailable__Result>;
|
|
36
|
+
export declare class IsAvailable__Result extends thrift.StructLike implements IIsAvailable__Result {
|
|
37
|
+
success?: MatchNotificationsAvailability.IMatchNotificationsAvailability;
|
|
38
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
39
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
40
|
+
constructor(args?: IIsAvailable__ResultArgs);
|
|
41
|
+
static read(input: thrift.TProtocol): IsAvailable__Result;
|
|
42
|
+
static write(args: IIsAvailable__ResultArgs, output: thrift.TProtocol): void;
|
|
43
|
+
write(output: thrift.TProtocol): void;
|
|
44
|
+
}
|
|
45
|
+
export declare class Client<Context = any> extends thrift.ThriftClient<Context> {
|
|
46
|
+
static readonly serviceName: string;
|
|
47
|
+
static readonly annotations: thrift.IThriftAnnotations;
|
|
48
|
+
static readonly methodAnnotations: thrift.IMethodAnnotations;
|
|
49
|
+
static readonly methodNames: Array<string>;
|
|
50
|
+
readonly _serviceName: string;
|
|
51
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
52
|
+
readonly _methodAnnotations: thrift.IMethodAnnotations;
|
|
53
|
+
readonly _methodNames: Array<string>;
|
|
54
|
+
readonly _methodParameters?: {
|
|
55
|
+
[methodName: string]: number;
|
|
56
|
+
};
|
|
57
|
+
isAvailable(footballMatch: FootballMatch.IFootballMatchArgs, context?: Context): Promise<MatchNotificationsAvailability.IMatchNotificationsAvailability>;
|
|
58
|
+
}
|
|
59
|
+
export interface IHandler<Context = any> {
|
|
60
|
+
isAvailable(footballMatch: FootballMatch.IFootballMatch, context?: Context): MatchNotificationsAvailability.IMatchNotificationsAvailabilityArgs | Promise<MatchNotificationsAvailability.IMatchNotificationsAvailabilityArgs>;
|
|
61
|
+
}
|
|
62
|
+
export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
|
|
63
|
+
protected readonly _handler: IHandler<Context>;
|
|
64
|
+
static readonly serviceName: string;
|
|
65
|
+
static readonly annotations: thrift.IThriftAnnotations;
|
|
66
|
+
static readonly methodAnnotations: thrift.IMethodAnnotations;
|
|
67
|
+
static readonly methodNames: Array<string>;
|
|
68
|
+
readonly _serviceName: string;
|
|
69
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
70
|
+
readonly _methodAnnotations: thrift.IMethodAnnotations;
|
|
71
|
+
readonly _methodNames: Array<string>;
|
|
72
|
+
constructor(handler: IHandler<Context>);
|
|
73
|
+
process(input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
74
|
+
process_isAvailable(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
75
|
+
}
|
|
@@ -0,0 +1,311 @@
|
|
|
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.IsAvailable__Result = exports.IsAvailable__ResultCodec = 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
|
+
const FootballMatch = __importStar(require("./FootballMatch"));
|
|
35
|
+
const MatchNotificationsAvailability = __importStar(require("./MatchNotificationsAvailability"));
|
|
36
|
+
exports.serviceName = "MatchNotifications";
|
|
37
|
+
exports.annotations = {};
|
|
38
|
+
exports.methodAnnotations = {
|
|
39
|
+
isAvailable: {
|
|
40
|
+
annotations: {},
|
|
41
|
+
fieldAnnotations: {}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.methodNames = ["isAvailable"];
|
|
45
|
+
exports.methodParameters = {
|
|
46
|
+
isAvailable: 2
|
|
47
|
+
};
|
|
48
|
+
exports.IsAvailable__ArgsCodec = {
|
|
49
|
+
encode(args, output) {
|
|
50
|
+
const obj = {
|
|
51
|
+
footballMatch: args.footballMatch
|
|
52
|
+
};
|
|
53
|
+
output.writeStructBegin("IsAvailable__Args");
|
|
54
|
+
if (obj.footballMatch != null) {
|
|
55
|
+
output.writeFieldBegin("footballMatch", thrift.TType.STRUCT, 1);
|
|
56
|
+
FootballMatch.FootballMatchCodec.encode(obj.footballMatch, output);
|
|
57
|
+
output.writeFieldEnd();
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[footballMatch] is unset!");
|
|
61
|
+
}
|
|
62
|
+
output.writeFieldStop();
|
|
63
|
+
output.writeStructEnd();
|
|
64
|
+
return;
|
|
65
|
+
},
|
|
66
|
+
decode(input) {
|
|
67
|
+
let _args = {};
|
|
68
|
+
input.readStructBegin();
|
|
69
|
+
while (true) {
|
|
70
|
+
const ret = input.readFieldBegin();
|
|
71
|
+
const fieldType = ret.fieldType;
|
|
72
|
+
const fieldId = ret.fieldId;
|
|
73
|
+
if (fieldType === thrift.TType.STOP) {
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
switch (fieldId) {
|
|
77
|
+
case 1:
|
|
78
|
+
if (fieldType === thrift.TType.STRUCT) {
|
|
79
|
+
const value_1 = FootballMatch.FootballMatchCodec.decode(input);
|
|
80
|
+
_args.footballMatch = value_1;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
input.skip(fieldType);
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
default: {
|
|
87
|
+
input.skip(fieldType);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
input.readFieldEnd();
|
|
91
|
+
}
|
|
92
|
+
input.readStructEnd();
|
|
93
|
+
if (_args.footballMatch !== undefined) {
|
|
94
|
+
return {
|
|
95
|
+
footballMatch: _args.footballMatch
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read IsAvailable__Args from input");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
class IsAvailable__Args extends thrift.StructLike {
|
|
104
|
+
constructor(args) {
|
|
105
|
+
super();
|
|
106
|
+
this._annotations = {};
|
|
107
|
+
this._fieldAnnotations = {};
|
|
108
|
+
if (args.footballMatch != null) {
|
|
109
|
+
const value_2 = new FootballMatch.FootballMatch(args.footballMatch);
|
|
110
|
+
this.footballMatch = value_2;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[footballMatch] is unset!");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
static read(input) {
|
|
117
|
+
return new IsAvailable__Args(exports.IsAvailable__ArgsCodec.decode(input));
|
|
118
|
+
}
|
|
119
|
+
static write(args, output) {
|
|
120
|
+
return exports.IsAvailable__ArgsCodec.encode(args, output);
|
|
121
|
+
}
|
|
122
|
+
write(output) {
|
|
123
|
+
return exports.IsAvailable__ArgsCodec.encode(this, output);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.IsAvailable__Args = IsAvailable__Args;
|
|
127
|
+
exports.IsAvailable__ResultCodec = {
|
|
128
|
+
encode(args, output) {
|
|
129
|
+
const obj = {
|
|
130
|
+
success: args.success
|
|
131
|
+
};
|
|
132
|
+
output.writeStructBegin("IsAvailable__Result");
|
|
133
|
+
if (obj.success != null) {
|
|
134
|
+
output.writeFieldBegin("success", thrift.TType.STRUCT, 0);
|
|
135
|
+
MatchNotificationsAvailability.MatchNotificationsAvailabilityCodec.encode(obj.success, output);
|
|
136
|
+
output.writeFieldEnd();
|
|
137
|
+
}
|
|
138
|
+
output.writeFieldStop();
|
|
139
|
+
output.writeStructEnd();
|
|
140
|
+
return;
|
|
141
|
+
},
|
|
142
|
+
decode(input) {
|
|
143
|
+
let _args = {};
|
|
144
|
+
input.readStructBegin();
|
|
145
|
+
while (true) {
|
|
146
|
+
const ret = input.readFieldBegin();
|
|
147
|
+
const fieldType = ret.fieldType;
|
|
148
|
+
const fieldId = ret.fieldId;
|
|
149
|
+
if (fieldType === thrift.TType.STOP) {
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
switch (fieldId) {
|
|
153
|
+
case 0:
|
|
154
|
+
if (fieldType === thrift.TType.STRUCT) {
|
|
155
|
+
const value_3 = MatchNotificationsAvailability.MatchNotificationsAvailabilityCodec.decode(input);
|
|
156
|
+
_args.success = value_3;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
input.skip(fieldType);
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
default: {
|
|
163
|
+
input.skip(fieldType);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
input.readFieldEnd();
|
|
167
|
+
}
|
|
168
|
+
input.readStructEnd();
|
|
169
|
+
return {
|
|
170
|
+
success: _args.success
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
class IsAvailable__Result extends thrift.StructLike {
|
|
175
|
+
constructor(args = {}) {
|
|
176
|
+
super();
|
|
177
|
+
this._annotations = {};
|
|
178
|
+
this._fieldAnnotations = {};
|
|
179
|
+
if (args.success != null) {
|
|
180
|
+
const value_4 = new MatchNotificationsAvailability.MatchNotificationsAvailability(args.success);
|
|
181
|
+
this.success = value_4;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
static read(input) {
|
|
185
|
+
return new IsAvailable__Result(exports.IsAvailable__ResultCodec.decode(input));
|
|
186
|
+
}
|
|
187
|
+
static write(args, output) {
|
|
188
|
+
return exports.IsAvailable__ResultCodec.encode(args, output);
|
|
189
|
+
}
|
|
190
|
+
write(output) {
|
|
191
|
+
return exports.IsAvailable__ResultCodec.encode(this, output);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
exports.IsAvailable__Result = IsAvailable__Result;
|
|
195
|
+
class Client extends thrift.ThriftClient {
|
|
196
|
+
constructor() {
|
|
197
|
+
super(...arguments);
|
|
198
|
+
this._serviceName = exports.serviceName;
|
|
199
|
+
this._annotations = exports.annotations;
|
|
200
|
+
this._methodAnnotations = exports.methodAnnotations;
|
|
201
|
+
this._methodNames = exports.methodNames;
|
|
202
|
+
this._methodParameters = exports.methodParameters;
|
|
203
|
+
}
|
|
204
|
+
isAvailable(footballMatch, context) {
|
|
205
|
+
const writer = new this.transport();
|
|
206
|
+
const output = new this.protocol(writer);
|
|
207
|
+
output.writeMessageBegin("isAvailable", thrift.MessageType.CALL, this.incrementRequestId());
|
|
208
|
+
const args = { footballMatch };
|
|
209
|
+
exports.IsAvailable__ArgsCodec.encode(args, output);
|
|
210
|
+
output.writeMessageEnd();
|
|
211
|
+
return this.connection.send(writer.flush(), context).then((data) => {
|
|
212
|
+
const reader = this.transport.receiver(data);
|
|
213
|
+
const input = new this.protocol(reader);
|
|
214
|
+
try {
|
|
215
|
+
const { fieldName: fieldName, messageType: messageType } = input.readMessageBegin();
|
|
216
|
+
if (fieldName === "isAvailable") {
|
|
217
|
+
if (messageType === thrift.MessageType.EXCEPTION) {
|
|
218
|
+
const err = thrift.TApplicationExceptionCodec.decode(input);
|
|
219
|
+
input.readMessageEnd();
|
|
220
|
+
return Promise.reject(err);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
const result = exports.IsAvailable__ResultCodec.decode(input);
|
|
224
|
+
input.readMessageEnd();
|
|
225
|
+
if (result.success != null) {
|
|
226
|
+
return Promise.resolve(result.success);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, "isAvailable failed: unknown result"));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
return Promise.reject(new thrift.TApplicationException(thrift.TApplicationExceptionType.WRONG_METHOD_NAME, "Received a response to an unknown RPC function: " + fieldName));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
catch (err) {
|
|
238
|
+
return Promise.reject(err);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.Client = Client;
|
|
244
|
+
Client.serviceName = exports.serviceName;
|
|
245
|
+
Client.annotations = exports.annotations;
|
|
246
|
+
Client.methodAnnotations = exports.methodAnnotations;
|
|
247
|
+
Client.methodNames = exports.methodNames;
|
|
248
|
+
class Processor extends thrift.ThriftProcessor {
|
|
249
|
+
constructor(handler) {
|
|
250
|
+
super();
|
|
251
|
+
this._serviceName = exports.serviceName;
|
|
252
|
+
this._annotations = exports.annotations;
|
|
253
|
+
this._methodAnnotations = exports.methodAnnotations;
|
|
254
|
+
this._methodNames = exports.methodNames;
|
|
255
|
+
this._handler = handler;
|
|
256
|
+
}
|
|
257
|
+
process(input, output, context) {
|
|
258
|
+
return new Promise((resolve, reject) => {
|
|
259
|
+
const metadata = input.readMessageBegin();
|
|
260
|
+
const fieldName = metadata.fieldName;
|
|
261
|
+
const requestId = metadata.requestId;
|
|
262
|
+
const methodName = "process_" + fieldName;
|
|
263
|
+
switch (methodName) {
|
|
264
|
+
case "process_isAvailable": {
|
|
265
|
+
resolve(this.process_isAvailable(requestId, input, output, context));
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
default: {
|
|
269
|
+
input.skip(thrift.TType.STRUCT);
|
|
270
|
+
input.readMessageEnd();
|
|
271
|
+
const errMessage = "Unknown function " + fieldName;
|
|
272
|
+
const err = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN_METHOD, errMessage);
|
|
273
|
+
output.writeMessageBegin(fieldName, thrift.MessageType.EXCEPTION, requestId);
|
|
274
|
+
thrift.TApplicationExceptionCodec.encode(err, output);
|
|
275
|
+
output.writeMessageEnd();
|
|
276
|
+
resolve(output.flush());
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
process_isAvailable(requestId, input, output, context) {
|
|
283
|
+
return new Promise((resolve, reject) => {
|
|
284
|
+
try {
|
|
285
|
+
const args = exports.IsAvailable__ArgsCodec.decode(input);
|
|
286
|
+
input.readMessageEnd();
|
|
287
|
+
resolve(this._handler.isAvailable(args.footballMatch, context));
|
|
288
|
+
}
|
|
289
|
+
catch (err) {
|
|
290
|
+
reject(err);
|
|
291
|
+
}
|
|
292
|
+
}).then((data) => {
|
|
293
|
+
const result = { success: data };
|
|
294
|
+
output.writeMessageBegin("isAvailable", thrift.MessageType.REPLY, requestId);
|
|
295
|
+
exports.IsAvailable__ResultCodec.encode(result, output);
|
|
296
|
+
output.writeMessageEnd();
|
|
297
|
+
return output.flush();
|
|
298
|
+
}).catch((err) => {
|
|
299
|
+
const result = new thrift.TApplicationException(thrift.TApplicationExceptionType.UNKNOWN, err.message);
|
|
300
|
+
output.writeMessageBegin("isAvailable", thrift.MessageType.EXCEPTION, requestId);
|
|
301
|
+
thrift.TApplicationExceptionCodec.encode(result, output);
|
|
302
|
+
output.writeMessageEnd();
|
|
303
|
+
return output.flush();
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
exports.Processor = Processor;
|
|
308
|
+
Processor.serviceName = exports.serviceName;
|
|
309
|
+
Processor.annotations = exports.annotations;
|
|
310
|
+
Processor.methodAnnotations = exports.methodAnnotations;
|
|
311
|
+
Processor.methodNames = exports.methodNames;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as thrift from "@creditkarma/thrift-server-core";
|
|
2
|
+
export interface IMatchNotificationsAvailability {
|
|
3
|
+
isAvailable: boolean;
|
|
4
|
+
unavailableReason?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IMatchNotificationsAvailabilityArgs {
|
|
7
|
+
isAvailable: boolean;
|
|
8
|
+
unavailableReason?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MatchNotificationsAvailabilityCodec: thrift.IStructCodec<IMatchNotificationsAvailabilityArgs, IMatchNotificationsAvailability>;
|
|
11
|
+
export declare class MatchNotificationsAvailability extends thrift.StructLike implements IMatchNotificationsAvailability {
|
|
12
|
+
isAvailable: boolean;
|
|
13
|
+
unavailableReason?: string;
|
|
14
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
15
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
16
|
+
constructor(args: IMatchNotificationsAvailabilityArgs);
|
|
17
|
+
static read(input: thrift.TProtocol): MatchNotificationsAvailability;
|
|
18
|
+
static write(args: IMatchNotificationsAvailabilityArgs, output: thrift.TProtocol): void;
|
|
19
|
+
write(output: thrift.TProtocol): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
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.MatchNotificationsAvailability = exports.MatchNotificationsAvailabilityCodec = 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.MatchNotificationsAvailabilityCodec = {
|
|
35
|
+
encode(args, output) {
|
|
36
|
+
const obj = {
|
|
37
|
+
isAvailable: args.isAvailable,
|
|
38
|
+
unavailableReason: args.unavailableReason
|
|
39
|
+
};
|
|
40
|
+
output.writeStructBegin("MatchNotificationsAvailability");
|
|
41
|
+
if (obj.isAvailable != null) {
|
|
42
|
+
output.writeFieldBegin("isAvailable", thrift.TType.BOOL, 1);
|
|
43
|
+
output.writeBool(obj.isAvailable);
|
|
44
|
+
output.writeFieldEnd();
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[isAvailable] is unset!");
|
|
48
|
+
}
|
|
49
|
+
if (obj.unavailableReason != null) {
|
|
50
|
+
output.writeFieldBegin("unavailableReason", thrift.TType.STRING, 2);
|
|
51
|
+
output.writeString(obj.unavailableReason);
|
|
52
|
+
output.writeFieldEnd();
|
|
53
|
+
}
|
|
54
|
+
output.writeFieldStop();
|
|
55
|
+
output.writeStructEnd();
|
|
56
|
+
return;
|
|
57
|
+
},
|
|
58
|
+
decode(input) {
|
|
59
|
+
let _args = {};
|
|
60
|
+
input.readStructBegin();
|
|
61
|
+
while (true) {
|
|
62
|
+
const ret = input.readFieldBegin();
|
|
63
|
+
const fieldType = ret.fieldType;
|
|
64
|
+
const fieldId = ret.fieldId;
|
|
65
|
+
if (fieldType === thrift.TType.STOP) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
switch (fieldId) {
|
|
69
|
+
case 1:
|
|
70
|
+
if (fieldType === thrift.TType.BOOL) {
|
|
71
|
+
const value_1 = input.readBool();
|
|
72
|
+
_args.isAvailable = value_1;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
input.skip(fieldType);
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
case 2:
|
|
79
|
+
if (fieldType === thrift.TType.STRING) {
|
|
80
|
+
const value_2 = input.readString();
|
|
81
|
+
_args.unavailableReason = value_2;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
input.skip(fieldType);
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
default: {
|
|
88
|
+
input.skip(fieldType);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
input.readFieldEnd();
|
|
92
|
+
}
|
|
93
|
+
input.readStructEnd();
|
|
94
|
+
if (_args.isAvailable !== undefined) {
|
|
95
|
+
return {
|
|
96
|
+
isAvailable: _args.isAvailable,
|
|
97
|
+
unavailableReason: _args.unavailableReason
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read MatchNotificationsAvailability from input");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
class MatchNotificationsAvailability extends thrift.StructLike {
|
|
106
|
+
constructor(args) {
|
|
107
|
+
super();
|
|
108
|
+
this._annotations = {};
|
|
109
|
+
this._fieldAnnotations = {};
|
|
110
|
+
if (args.isAvailable != null) {
|
|
111
|
+
const value_3 = args.isAvailable;
|
|
112
|
+
this.isAvailable = value_3;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[isAvailable] is unset!");
|
|
116
|
+
}
|
|
117
|
+
if (args.unavailableReason != null) {
|
|
118
|
+
const value_4 = args.unavailableReason;
|
|
119
|
+
this.unavailableReason = value_4;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
static read(input) {
|
|
123
|
+
return new MatchNotificationsAvailability(exports.MatchNotificationsAvailabilityCodec.decode(input));
|
|
124
|
+
}
|
|
125
|
+
static write(args, output) {
|
|
126
|
+
return exports.MatchNotificationsAvailabilityCodec.encode(args, output);
|
|
127
|
+
}
|
|
128
|
+
write(output) {
|
|
129
|
+
return exports.MatchNotificationsAvailabilityCodec.encode(this, output);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.MatchNotificationsAvailability = MatchNotificationsAvailability;
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export * from "./VideoSlot";
|
|
|
14
14
|
export * from "./MetricPaint";
|
|
15
15
|
export * from "./MetricFont";
|
|
16
16
|
export * from "./VideoEvent";
|
|
17
|
+
export * from "./MatchNotificationsAvailability";
|
|
18
|
+
export * from "./FootballTeam";
|
|
19
|
+
export * from "./FootballMatch";
|
|
17
20
|
export * from "./Metric";
|
|
18
21
|
export * from "./DiscussionServiceResponse";
|
|
19
22
|
import * as Environment from "./Environment";
|
|
@@ -26,6 +29,8 @@ import * as Tag from "./Tag";
|
|
|
26
29
|
export { Tag as Tag };
|
|
27
30
|
import * as Notifications from "./Notifications";
|
|
28
31
|
export { Notifications as Notifications };
|
|
32
|
+
import * as MatchNotifications from "./MatchNotifications";
|
|
33
|
+
export { MatchNotifications as MatchNotifications };
|
|
29
34
|
import * as ListenToArticle from "./ListenToArticle";
|
|
30
35
|
export { ListenToArticle as ListenToArticle };
|
|
31
36
|
import * as Audio from "./Audio";
|
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.Notifications = exports.Tag = exports.Acquisitions = exports.Commercial = exports.Environment = void 0;
|
|
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;
|
|
30
30
|
/* tslint:disable */
|
|
31
31
|
/* eslint-disable */
|
|
32
32
|
/*
|
|
@@ -49,6 +49,9 @@ __exportStar(require("./VideoSlot"), exports);
|
|
|
49
49
|
__exportStar(require("./MetricPaint"), exports);
|
|
50
50
|
__exportStar(require("./MetricFont"), exports);
|
|
51
51
|
__exportStar(require("./VideoEvent"), exports);
|
|
52
|
+
__exportStar(require("./MatchNotificationsAvailability"), exports);
|
|
53
|
+
__exportStar(require("./FootballTeam"), exports);
|
|
54
|
+
__exportStar(require("./FootballMatch"), exports);
|
|
52
55
|
__exportStar(require("./Metric"), exports);
|
|
53
56
|
__exportStar(require("./DiscussionServiceResponse"), exports);
|
|
54
57
|
const Environment = __importStar(require("./Environment"));
|
|
@@ -61,6 +64,8 @@ const Tag = __importStar(require("./Tag"));
|
|
|
61
64
|
exports.Tag = Tag;
|
|
62
65
|
const Notifications = __importStar(require("./Notifications"));
|
|
63
66
|
exports.Notifications = Notifications;
|
|
67
|
+
const MatchNotifications = __importStar(require("./MatchNotifications"));
|
|
68
|
+
exports.MatchNotifications = MatchNotifications;
|
|
64
69
|
const ListenToArticle = __importStar(require("./ListenToArticle"));
|
|
65
70
|
exports.ListenToArticle = ListenToArticle;
|
|
66
71
|
const Audio = __importStar(require("./Audio"));
|