Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Conversation

Blckbrry-Pi
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Blckbrry-Pi commented Jul 19, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Blckbrry-Pi and the rest of your teammates on Graphite Graphite

@Blckbrry-Pi Blckbrry-Pi force-pushed the 07-04-feat_create_the_user_passwords_module branch from 7a771d2 to a84215f Compare July 20, 2024 17:42
@Blckbrry-Pi Blckbrry-Pi force-pushed the 07-19-feat_create_the_sms_module branch from 8ffc555 to 5408b00 Compare July 20, 2024 17:43

export type Response = Message;

export async function run(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is too verbose. we need to provide a generic superset over other peoples' apis. it's better to expose less than more so we can maintain consistent behavior across providers. i'd recommend completely deleting this script unless you see a good reason otherwise.

} else if ("twilio" in ctx.config.provider) {
provider = new TwilioProvider(ctx.config.provider.twilio);
} else {
throw new RuntimeError("unreachable");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use unreachableerror

export interface Request {
to: string;
content: string;
useGSM7?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik we don't need to provide this, it's done by default: https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding#how-twilio-encodes-your-messages

keep the api as minimal as possible


export interface Config {
provider: Provider;
convertCurrencyTo?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove me (see get_message)

@@ -0,0 +1,16 @@
import { RuntimeError } from "../module.gen.ts";

export async function convertCurrencyTo(from: string, to: string, amount: number): Promise<number> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

FAILED = "failed",
}

export interface Message {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove completely

useGSM7?: boolean;
}

export type Response = Message;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not need to return anything. see comment in get_message

FAILED = "failed",
}

export interface Message {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remoev

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants