@guardian/bridget 8.3.3 → 8.5.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/Environment.d.ts +32 -0
- package/Environment.js +185 -3
- package/Interactives.d.ts +71 -0
- package/Interactives.js +273 -0
- package/ListenToArticle.d.ts +178 -0
- package/ListenToArticle.js +963 -0
- package/NativePlatform.d.ts +4 -0
- package/NativePlatform.js +14 -0
- package/index.d.ts +5 -0
- package/index.js +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import * as thrift from "@creditkarma/thrift-server-core";
|
|
4
|
+
export declare const serviceName: string;
|
|
5
|
+
export declare const annotations: thrift.IThriftAnnotations;
|
|
6
|
+
export declare const methodAnnotations: thrift.IMethodAnnotations;
|
|
7
|
+
export declare const methodNames: Array<string>;
|
|
8
|
+
export declare const methodParameters: {
|
|
9
|
+
[methodName: string]: number;
|
|
10
|
+
};
|
|
11
|
+
export interface IIsAvailable__Args {
|
|
12
|
+
articleId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IIsAvailable__ArgsArgs {
|
|
15
|
+
articleId: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const IsAvailable__ArgsCodec: thrift.IStructCodec<IIsAvailable__ArgsArgs, IIsAvailable__Args>;
|
|
18
|
+
export declare class IsAvailable__Args extends thrift.StructLike implements IIsAvailable__Args {
|
|
19
|
+
articleId: string;
|
|
20
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
21
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
22
|
+
constructor(args: IIsAvailable__ArgsArgs);
|
|
23
|
+
static read(input: thrift.TProtocol): IsAvailable__Args;
|
|
24
|
+
static write(args: IIsAvailable__ArgsArgs, output: thrift.TProtocol): void;
|
|
25
|
+
write(output: thrift.TProtocol): void;
|
|
26
|
+
}
|
|
27
|
+
export interface IPlay__Args {
|
|
28
|
+
articleId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IPlay__ArgsArgs {
|
|
31
|
+
articleId: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const Play__ArgsCodec: thrift.IStructCodec<IPlay__ArgsArgs, IPlay__Args>;
|
|
34
|
+
export declare class Play__Args extends thrift.StructLike implements IPlay__Args {
|
|
35
|
+
articleId: string;
|
|
36
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
37
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
38
|
+
constructor(args: IPlay__ArgsArgs);
|
|
39
|
+
static read(input: thrift.TProtocol): Play__Args;
|
|
40
|
+
static write(args: IPlay__ArgsArgs, output: thrift.TProtocol): void;
|
|
41
|
+
write(output: thrift.TProtocol): void;
|
|
42
|
+
}
|
|
43
|
+
export interface IIsPlaying__Args {
|
|
44
|
+
articleId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface IIsPlaying__ArgsArgs {
|
|
47
|
+
articleId: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const IsPlaying__ArgsCodec: thrift.IStructCodec<IIsPlaying__ArgsArgs, IIsPlaying__Args>;
|
|
50
|
+
export declare class IsPlaying__Args extends thrift.StructLike implements IIsPlaying__Args {
|
|
51
|
+
articleId: string;
|
|
52
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
53
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
54
|
+
constructor(args: IIsPlaying__ArgsArgs);
|
|
55
|
+
static read(input: thrift.TProtocol): IsPlaying__Args;
|
|
56
|
+
static write(args: IIsPlaying__ArgsArgs, output: thrift.TProtocol): void;
|
|
57
|
+
write(output: thrift.TProtocol): void;
|
|
58
|
+
}
|
|
59
|
+
export interface IPause__Args {
|
|
60
|
+
articleId: string;
|
|
61
|
+
}
|
|
62
|
+
export interface IPause__ArgsArgs {
|
|
63
|
+
articleId: string;
|
|
64
|
+
}
|
|
65
|
+
export declare const Pause__ArgsCodec: thrift.IStructCodec<IPause__ArgsArgs, IPause__Args>;
|
|
66
|
+
export declare class Pause__Args extends thrift.StructLike implements IPause__Args {
|
|
67
|
+
articleId: string;
|
|
68
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
69
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
70
|
+
constructor(args: IPause__ArgsArgs);
|
|
71
|
+
static read(input: thrift.TProtocol): Pause__Args;
|
|
72
|
+
static write(args: IPause__ArgsArgs, output: thrift.TProtocol): void;
|
|
73
|
+
write(output: thrift.TProtocol): void;
|
|
74
|
+
}
|
|
75
|
+
export interface IIsAvailable__Result {
|
|
76
|
+
success?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface IIsAvailable__ResultArgs {
|
|
79
|
+
success?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare const IsAvailable__ResultCodec: thrift.IStructCodec<IIsAvailable__ResultArgs, IIsAvailable__Result>;
|
|
82
|
+
export declare class IsAvailable__Result extends thrift.StructLike implements IIsAvailable__Result {
|
|
83
|
+
success?: boolean;
|
|
84
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
85
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
86
|
+
constructor(args?: IIsAvailable__ResultArgs);
|
|
87
|
+
static read(input: thrift.TProtocol): IsAvailable__Result;
|
|
88
|
+
static write(args: IIsAvailable__ResultArgs, output: thrift.TProtocol): void;
|
|
89
|
+
write(output: thrift.TProtocol): void;
|
|
90
|
+
}
|
|
91
|
+
export interface IPlay__Result {
|
|
92
|
+
success?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface IPlay__ResultArgs {
|
|
95
|
+
success?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export declare const Play__ResultCodec: thrift.IStructCodec<IPlay__ResultArgs, IPlay__Result>;
|
|
98
|
+
export declare class Play__Result extends thrift.StructLike implements IPlay__Result {
|
|
99
|
+
success?: boolean;
|
|
100
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
101
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
102
|
+
constructor(args?: IPlay__ResultArgs);
|
|
103
|
+
static read(input: thrift.TProtocol): Play__Result;
|
|
104
|
+
static write(args: IPlay__ResultArgs, output: thrift.TProtocol): void;
|
|
105
|
+
write(output: thrift.TProtocol): void;
|
|
106
|
+
}
|
|
107
|
+
export interface IIsPlaying__Result {
|
|
108
|
+
success?: boolean;
|
|
109
|
+
}
|
|
110
|
+
export interface IIsPlaying__ResultArgs {
|
|
111
|
+
success?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export declare const IsPlaying__ResultCodec: thrift.IStructCodec<IIsPlaying__ResultArgs, IIsPlaying__Result>;
|
|
114
|
+
export declare class IsPlaying__Result extends thrift.StructLike implements IIsPlaying__Result {
|
|
115
|
+
success?: boolean;
|
|
116
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
117
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
118
|
+
constructor(args?: IIsPlaying__ResultArgs);
|
|
119
|
+
static read(input: thrift.TProtocol): IsPlaying__Result;
|
|
120
|
+
static write(args: IIsPlaying__ResultArgs, output: thrift.TProtocol): void;
|
|
121
|
+
write(output: thrift.TProtocol): void;
|
|
122
|
+
}
|
|
123
|
+
export interface IPause__Result {
|
|
124
|
+
success?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface IPause__ResultArgs {
|
|
127
|
+
success?: boolean;
|
|
128
|
+
}
|
|
129
|
+
export declare const Pause__ResultCodec: thrift.IStructCodec<IPause__ResultArgs, IPause__Result>;
|
|
130
|
+
export declare class Pause__Result extends thrift.StructLike implements IPause__Result {
|
|
131
|
+
success?: boolean;
|
|
132
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
133
|
+
readonly _fieldAnnotations: thrift.IFieldAnnotations;
|
|
134
|
+
constructor(args?: IPause__ResultArgs);
|
|
135
|
+
static read(input: thrift.TProtocol): Pause__Result;
|
|
136
|
+
static write(args: IPause__ResultArgs, output: thrift.TProtocol): void;
|
|
137
|
+
write(output: thrift.TProtocol): void;
|
|
138
|
+
}
|
|
139
|
+
export declare class Client<Context = any> extends thrift.ThriftClient<Context> {
|
|
140
|
+
static readonly serviceName: string;
|
|
141
|
+
static readonly annotations: thrift.IThriftAnnotations;
|
|
142
|
+
static readonly methodAnnotations: thrift.IMethodAnnotations;
|
|
143
|
+
static readonly methodNames: Array<string>;
|
|
144
|
+
readonly _serviceName: string;
|
|
145
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
146
|
+
readonly _methodAnnotations: thrift.IMethodAnnotations;
|
|
147
|
+
readonly _methodNames: Array<string>;
|
|
148
|
+
readonly _methodParameters?: {
|
|
149
|
+
[methodName: string]: number;
|
|
150
|
+
};
|
|
151
|
+
isAvailable(articleId: string, context?: Context): Promise<boolean>;
|
|
152
|
+
play(articleId: string, context?: Context): Promise<boolean>;
|
|
153
|
+
isPlaying(articleId: string, context?: Context): Promise<boolean>;
|
|
154
|
+
pause(articleId: string, context?: Context): Promise<boolean>;
|
|
155
|
+
}
|
|
156
|
+
export interface IHandler<Context = any> {
|
|
157
|
+
isAvailable(articleId: string, context?: Context): boolean | Promise<boolean>;
|
|
158
|
+
play(articleId: string, context?: Context): boolean | Promise<boolean>;
|
|
159
|
+
isPlaying(articleId: string, context?: Context): boolean | Promise<boolean>;
|
|
160
|
+
pause(articleId: string, context?: Context): boolean | Promise<boolean>;
|
|
161
|
+
}
|
|
162
|
+
export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
|
|
163
|
+
protected readonly _handler: IHandler<Context>;
|
|
164
|
+
static readonly serviceName: string;
|
|
165
|
+
static readonly annotations: thrift.IThriftAnnotations;
|
|
166
|
+
static readonly methodAnnotations: thrift.IMethodAnnotations;
|
|
167
|
+
static readonly methodNames: Array<string>;
|
|
168
|
+
readonly _serviceName: string;
|
|
169
|
+
readonly _annotations: thrift.IThriftAnnotations;
|
|
170
|
+
readonly _methodAnnotations: thrift.IMethodAnnotations;
|
|
171
|
+
readonly _methodNames: Array<string>;
|
|
172
|
+
constructor(handler: IHandler<Context>);
|
|
173
|
+
process(input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
174
|
+
process_isAvailable(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
175
|
+
process_play(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
176
|
+
process_isPlaying(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
177
|
+
process_pause(requestId: number, input: thrift.TProtocol, output: thrift.TProtocol, context: Context): Promise<Buffer>;
|
|
178
|
+
}
|