@guardian/bridget 1.13.0 → 2.1.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/Newsletters.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /// <reference types="node" />
2
2
  import * as thrift from "@creditkarma/thrift-server-core";
3
- import * as NewsletterSignUpResponse from "./NewsletterSignUpResponse";
4
3
  export declare const serviceName: string;
5
4
  export declare const annotations: thrift.IThriftAnnotations;
6
5
  export declare const methodAnnotations: thrift.IMethodAnnotations;
@@ -28,14 +27,14 @@ export declare class RequestSignUp__Args extends thrift.StructLike implements IR
28
27
  write(output: thrift.TProtocol): void;
29
28
  }
30
29
  export interface IRequestSignUp__Result {
31
- success?: NewsletterSignUpResponse.INewsletterSignUpResponse;
30
+ success?: boolean;
32
31
  }
33
32
  export interface IRequestSignUp__ResultArgs {
34
- success?: NewsletterSignUpResponse.INewsletterSignUpResponseArgs;
33
+ success?: boolean;
35
34
  }
36
35
  export declare const RequestSignUp__ResultCodec: thrift.IStructCodec<IRequestSignUp__ResultArgs, IRequestSignUp__Result>;
37
36
  export declare class RequestSignUp__Result extends thrift.StructLike implements IRequestSignUp__Result {
38
- success?: NewsletterSignUpResponse.INewsletterSignUpResponse;
37
+ success?: boolean;
39
38
  readonly _annotations: thrift.IThriftAnnotations;
40
39
  readonly _fieldAnnotations: thrift.IFieldAnnotations;
41
40
  constructor(args?: IRequestSignUp__ResultArgs);
@@ -55,10 +54,10 @@ export declare class Client<Context = any> extends thrift.ThriftClient<Context>
55
54
  readonly _methodParameters?: {
56
55
  [methodName: string]: number;
57
56
  };
58
- requestSignUp(emailAddress: string, newsletterIdentityName: string, context?: Context): Promise<NewsletterSignUpResponse.INewsletterSignUpResponse>;
57
+ requestSignUp(emailAddress: string, newsletterIdentityName: string, context?: Context): Promise<boolean>;
59
58
  }
60
59
  export interface IHandler<Context = any> {
61
- requestSignUp(emailAddress: string, newsletterIdentityName: string, context?: Context): NewsletterSignUpResponse.INewsletterSignUpResponseArgs | Promise<NewsletterSignUpResponse.INewsletterSignUpResponseArgs>;
60
+ requestSignUp(emailAddress: string, newsletterIdentityName: string, context?: Context): boolean | Promise<boolean>;
62
61
  }
63
62
  export declare class Processor<Context = any> extends thrift.ThriftProcessor<Context, IHandler<Context>> {
64
63
  protected readonly _handler: IHandler<Context>;
package/Newsletters.js CHANGED
@@ -14,7 +14,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
15
15
  */
16
16
  const thrift = __importStar(require("@creditkarma/thrift-server-core"));
17
- const NewsletterSignUpResponse = __importStar(require("./NewsletterSignUpResponse"));
18
17
  exports.serviceName = "Newsletters";
19
18
  exports.annotations = {};
20
19
  exports.methodAnnotations = {
@@ -139,8 +138,8 @@ exports.RequestSignUp__ResultCodec = {
139
138
  };
140
139
  output.writeStructBegin("RequestSignUp__Result");
141
140
  if (obj.success != null) {
142
- output.writeFieldBegin("success", thrift.TType.STRUCT, 0);
143
- NewsletterSignUpResponse.NewsletterSignUpResponseCodec.encode(obj.success, output);
141
+ output.writeFieldBegin("success", thrift.TType.BOOL, 0);
142
+ output.writeBool(obj.success);
144
143
  output.writeFieldEnd();
145
144
  }
146
145
  output.writeFieldStop();
@@ -159,8 +158,8 @@ exports.RequestSignUp__ResultCodec = {
159
158
  }
160
159
  switch (fieldId) {
161
160
  case 0:
162
- if (fieldType === thrift.TType.STRUCT) {
163
- const value_5 = NewsletterSignUpResponse.NewsletterSignUpResponseCodec.decode(input);
161
+ if (fieldType === thrift.TType.BOOL) {
162
+ const value_5 = input.readBool();
164
163
  _args.success = value_5;
165
164
  }
166
165
  else {
@@ -185,7 +184,7 @@ class RequestSignUp__Result extends thrift.StructLike {
185
184
  this._annotations = {};
186
185
  this._fieldAnnotations = {};
187
186
  if (args.success != null) {
188
- const value_6 = new NewsletterSignUpResponse.NewsletterSignUpResponse(args.success);
187
+ const value_6 = args.success;
189
188
  this.success = value_6;
190
189
  }
191
190
  }
package/index.d.ts CHANGED
@@ -9,7 +9,6 @@ export * from "./VideoSlot";
9
9
  export * from "./MetricPaint";
10
10
  export * from "./MetricFont";
11
11
  export * from "./CommentResponse";
12
- export * from "./NewsletterSignUpResponse";
13
12
  export * from "./Metric";
14
13
  import * as Environment from "./Environment";
15
14
  export { Environment as Environment };
package/index.js CHANGED
@@ -27,7 +27,6 @@ __export(require("./VideoSlot"));
27
27
  __export(require("./MetricPaint"));
28
28
  __export(require("./MetricFont"));
29
29
  __export(require("./CommentResponse"));
30
- __export(require("./NewsletterSignUpResponse"));
31
30
  __export(require("./Metric"));
32
31
  const Environment = __importStar(require("./Environment"));
33
32
  exports.Environment = Environment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/bridget",
3
- "version": "1.13.0",
3
+ "version": "2.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,17 +0,0 @@
1
- import * as thrift from "@creditkarma/thrift-server-core";
2
- export interface INewsletterSignUpResponse {
3
- success: boolean;
4
- }
5
- export interface INewsletterSignUpResponseArgs {
6
- success: boolean;
7
- }
8
- export declare const NewsletterSignUpResponseCodec: thrift.IStructCodec<INewsletterSignUpResponseArgs, INewsletterSignUpResponse>;
9
- export declare class NewsletterSignUpResponse extends thrift.StructLike implements INewsletterSignUpResponse {
10
- success: boolean;
11
- readonly _annotations: thrift.IThriftAnnotations;
12
- readonly _fieldAnnotations: thrift.IFieldAnnotations;
13
- constructor(args: INewsletterSignUpResponseArgs);
14
- static read(input: thrift.TProtocol): NewsletterSignUpResponse;
15
- static write(args: INewsletterSignUpResponseArgs, output: thrift.TProtocol): void;
16
- write(output: thrift.TProtocol): void;
17
- }
@@ -1,95 +0,0 @@
1
- "use strict";
2
- var __importStar = (this && this.__importStar) || function (mod) {
3
- if (mod && mod.__esModule) return mod;
4
- var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
7
- return result;
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- /* tslint:disable */
11
- /* eslint-disable */
12
- /*
13
- * Autogenerated by @creditkarma/thrift-typescript v3.7.6
14
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
15
- */
16
- const thrift = __importStar(require("@creditkarma/thrift-server-core"));
17
- exports.NewsletterSignUpResponseCodec = {
18
- encode(args, output) {
19
- const obj = {
20
- success: args.success
21
- };
22
- output.writeStructBegin("NewsletterSignUpResponse");
23
- if (obj.success != null) {
24
- output.writeFieldBegin("success", thrift.TType.BOOL, 1);
25
- output.writeBool(obj.success);
26
- output.writeFieldEnd();
27
- }
28
- else {
29
- throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[success] is unset!");
30
- }
31
- output.writeFieldStop();
32
- output.writeStructEnd();
33
- return;
34
- },
35
- decode(input) {
36
- let _args = {};
37
- input.readStructBegin();
38
- while (true) {
39
- const ret = input.readFieldBegin();
40
- const fieldType = ret.fieldType;
41
- const fieldId = ret.fieldId;
42
- if (fieldType === thrift.TType.STOP) {
43
- break;
44
- }
45
- switch (fieldId) {
46
- case 1:
47
- if (fieldType === thrift.TType.BOOL) {
48
- const value_1 = input.readBool();
49
- _args.success = value_1;
50
- }
51
- else {
52
- input.skip(fieldType);
53
- }
54
- break;
55
- default: {
56
- input.skip(fieldType);
57
- }
58
- }
59
- input.readFieldEnd();
60
- }
61
- input.readStructEnd();
62
- if (_args.success !== undefined) {
63
- return {
64
- success: _args.success
65
- };
66
- }
67
- else {
68
- throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Unable to read NewsletterSignUpResponse from input");
69
- }
70
- }
71
- };
72
- class NewsletterSignUpResponse extends thrift.StructLike {
73
- constructor(args) {
74
- super();
75
- this._annotations = {};
76
- this._fieldAnnotations = {};
77
- if (args.success != null) {
78
- const value_2 = args.success;
79
- this.success = value_2;
80
- }
81
- else {
82
- throw new thrift.TProtocolException(thrift.TProtocolExceptionType.UNKNOWN, "Required field[success] is unset!");
83
- }
84
- }
85
- static read(input) {
86
- return new NewsletterSignUpResponse(exports.NewsletterSignUpResponseCodec.decode(input));
87
- }
88
- static write(args, output) {
89
- return exports.NewsletterSignUpResponseCodec.encode(args, output);
90
- }
91
- write(output) {
92
- return exports.NewsletterSignUpResponseCodec.encode(this, output);
93
- }
94
- }
95
- exports.NewsletterSignUpResponse = NewsletterSignUpResponse;