From 883cfb4a976469b2585ff4d4bf63f65a8b461fb1 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 30 May 2024 09:13:40 -0700 Subject: [PATCH 1/3] fix(slack): readme example did not compile (#251) Some names have changed. --- slack/README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/slack/README.md b/slack/README.md index b2f2f148..2689d869 100644 --- a/slack/README.md +++ b/slack/README.md @@ -122,15 +122,9 @@ Navigate back to your Slack App, under the Event Subscriptions section, paste th If you want to post directly to a channel, you can do so by using the following code: ```js -bring slack; -bring cloud; - -let slackbot = new slack.Slackbot(); - let postMessage = new cloud.Function(inflight () => { - let channel = slackbot.getChannel("NAME|ID"); - - channel.postText("hello world!"); + let channel = bot.channel("NAME|ID"); + channel.post("hello world!"); }); ``` From 20d3dc169165db37243ca4df6dd7e0d6415dafd9 Mon Sep 17 00:00:00 2001 From: eladcon Date: Thu, 30 May 2024 22:14:09 +0300 Subject: [PATCH 2/3] feat: ses + sns icons (#253) missed those in the last PR... --- ses/aws.extern.d.ts | 4 ++-- ses/lib.w | 2 ++ ses/package-lock.json | 4 ++-- ses/package.json | 2 +- sns/lib.w | 4 ++++ sns/package-lock.json | 4 ++-- sns/package.json | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ses/aws.extern.d.ts b/ses/aws.extern.d.ts index dc9b5289..428a8090 100644 --- a/ses/aws.extern.d.ts +++ b/ses/aws.extern.d.ts @@ -1,6 +1,6 @@ export default interface extern { - _sendEmail: (options: SendEmailOptions) => Promise<(string) | undefined>, - _sendRawEmail: (options: SendRawEmailOptions) => Promise<(string) | undefined>, + _sendEmail: (options: SendEmailOptions) => Promise, + _sendRawEmail: (options: SendRawEmailOptions) => Promise, } export interface Destination { readonly BccAddresses?: ((readonly (string)[])) | undefined; diff --git a/ses/lib.w b/ses/lib.w index 15c19fd4..e2cb4ec3 100644 --- a/ses/lib.w +++ b/ses/lib.w @@ -23,6 +23,8 @@ pub class EmailService impl types.IEmailService { } nodeof(this.inner).hidden = true; + nodeof(this).icon = "inbox"; + nodeof(this).color = "pink"; } pub inflight sendEmail(options: types.SendEmailOptions): str? { diff --git a/ses/package-lock.json b/ses/package-lock.json index 3602ada1..f6ffab5a 100644 --- a/ses/package-lock.json +++ b/ses/package-lock.json @@ -1,12 +1,12 @@ { "name": "@winglibs/ses", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@winglibs/ses", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "peerDependencies": { "@aws-sdk/client-ses": "^3.572.0", diff --git a/ses/package.json b/ses/package.json index 07271b0d..2c0ed309 100644 --- a/ses/package.json +++ b/ses/package.json @@ -1,7 +1,7 @@ { "name": "@winglibs/ses", "description": "Wing library for interacting with AWS SES", - "version": "0.0.1", + "version": "0.0.2", "repository": { "type": "git", "url": "https://github.com/winglang/winglibs.git", diff --git a/sns/lib.w b/sns/lib.w index 50ccb4fc..b57f2f6e 100644 --- a/sns/lib.w +++ b/sns/lib.w @@ -24,6 +24,10 @@ pub class MobileClient impl types.IMobileClient { } else { throw "Unsupported target {target}"; } + + nodeof(this.inner).hidden = true; + nodeof(this).icon = "chat-bubble-left"; + nodeof(this).color = "sky"; } pub inflight publish(options: types.PublishOptions): types.PublishResult { diff --git a/sns/package-lock.json b/sns/package-lock.json index 0c7e2f03..f1aef3ac 100644 --- a/sns/package-lock.json +++ b/sns/package-lock.json @@ -1,12 +1,12 @@ { "name": "@winglibs/sns", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@winglibs/sns", - "version": "0.0.2", + "version": "0.0.3", "license": "MIT", "peerDependencies": { "@aws-sdk/client-sns": "^3.577.0" diff --git a/sns/package.json b/sns/package.json index 5612303a..5d8b5d71 100644 --- a/sns/package.json +++ b/sns/package.json @@ -1,7 +1,7 @@ { "name": "@winglibs/sns", "description": "Wing library for interacting with AWS SNS", - "version": "0.0.2", + "version": "0.0.3", "repository": { "type": "git", "url": "https://github.com/winglang/winglibs.git", From 41add1a966b744c7a5f25714057a9922b1497053 Mon Sep 17 00:00:00 2001 From: Hasan <45375125+hasanaburayyan@users.noreply.github.com> Date: Thu, 30 May 2024 15:49:17 -0400 Subject: [PATCH 3/3] fix(slack): update package version for last change (#252) I tried to add this to the last PR but it was a non blocking comment cause I goofed --- slack/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slack/package.json b/slack/package.json index d7883903..3059ae2a 100644 --- a/slack/package.json +++ b/slack/package.json @@ -1,6 +1,6 @@ { "name": "@winglibs/slack", - "version": "0.1.0", + "version": "0.1.1", "description": "Slack library for Wing", "repository": { "type": "git",