Skip to content

Commit 7ec137c

Browse files
author
eladcon
authored
chore(sns)!: change mobile class name (#249)
1 parent 41add1a commit 7ec137c

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

sns/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm i @winglibs/sns
1717
```js
1818
bring sns;
1919

20-
let client = new sns.MobileClient();
20+
let client = new sns.MobileNotifications();
2121

2222
test "sending an SMS" {
2323
client.publish(PhoneNumber: "+14155552671", Message: "Hello");

sns/aws.w

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ bring cloud;
22
bring "./types.w" as types;
33
bring aws;
44

5-
pub class MobileClient_aws impl types.IMobileClient {
5+
pub class MobileNotifications_aws impl types.IMobileNotifications {
66
pub inflight publish(options: types.PublishOptions): types.PublishResult {
7-
return MobileClient_aws._publish(options);
7+
return MobileNotifications_aws._publish(options);
88
}
99

1010
pub onLift(host: std.IInflightHost, ops: Array<str>) {

sns/lib.test.w

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
bring "./lib.w" as sns;
22

3-
let client = new sns.MobileClient();
3+
let client = new sns.MobileNotifications();
44

55
test "will send an SMS" {
66
client.publish(PhoneNumber: "+14155552671", Message: "Hello");

sns/lib.w

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ bring "./types.w" as types;
33
bring "./sim.w" as sim;
44
bring "./aws.w" as aws;
55

6-
/// MobileClient is a client for interacting with SNS mobile service.
6+
/// MobileNotifications is a client for interacting with SNS mobile service.
77
/// No cloud resources are created when using this class.
88
/// When running the simulator in a non test environment, it will use the
99
/// actual cloud implementation.
10-
pub class MobileClient impl types.IMobileClient {
11-
inner: types.IMobileClient;
10+
pub class MobileNotifications impl types.IMobileNotifications {
11+
inner: types.IMobileNotifications;
1212
new() {
1313
let target = util.env("WING_TARGET");
1414
if target == "sim" {
1515
if std.Node.of(this).app.isTestEnvironment {
16-
this.inner = new sim.MobileClient_sim();
16+
this.inner = new sim.MobileNotifications_sim();
1717
} else {
18-
this.inner = new aws.MobileClient_aws();
18+
this.inner = new aws.MobileNotifications_aws();
1919
}
2020
} elif target == "tf-aws" {
21-
this.inner = new aws.MobileClient_aws();
21+
this.inner = new aws.MobileNotifications_aws();
2222
} elif target == "awscdk" {
23-
this.inner = new aws.MobileClient_aws();
23+
this.inner = new aws.MobileNotifications_aws();
2424
} else {
2525
throw "Unsupported target {target}";
2626
}

sns/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sns/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@winglibs/sns",
33
"description": "Wing library for interacting with AWS SNS",
4-
"version": "0.0.3",
4+
"version": "0.1.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/winglang/winglibs.git",

sns/sim.w

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ bring cloud;
22
bring util;
33
bring "./types.w" as types;
44

5-
pub class MobileClient_sim impl types.IMobileClient {
5+
pub class MobileNotifications_sim impl types.IMobileNotifications {
66
store: cloud.Bucket;
77
new() {
88
this.store = new cloud.Bucket() as "Inbox";

sns/types.w

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ pub struct PublishResult {
1616
SequenceNumber: str?;
1717
}
1818

19-
pub interface IMobileClient {
19+
pub interface IMobileNotifications {
2020
inflight publish(options: PublishOptions): PublishResult;
2121
}

0 commit comments

Comments
 (0)